You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transaction method of the mongodb connection does not call the beginTransaction method. If dispatch job with afterCommit=true, the queue will be sent before commit. This behavior differs from mysql connection
Steps to reproduce
try {
DB::connection('mysql')->transaction(staticfunction (): void {
dispatch(fn() => dump('dump from mysql dispatch'))
->onConnection('sync')
->afterCommit();
thrownew \Exception('Command not executed.');
});
} catch (\Exception) {
}
try {
DB::connection('mongodb')->transaction(staticfunction (): void {
dispatch(fn() => dump('dump from mongodb dispatch'))
->onConnection('sync')
->afterCommit();
thrownew \Exception('Command not executed.');
});
} catch (\Exception) {
}
Description:
The transaction method of the
mongodb
connection does not call thebeginTransaction
method. If dispatch job withafterCommit
=true, the queue will be sent beforecommit
. This behavior differs frommysql
connectionSteps to reproduce
Expected behaviour
Jobs will not be completed
Actual behaviour
We get dump =
dump from mongodb dispatch
Additional debug
The text was updated successfully, but these errors were encountered: