txn: introduce TXN_SIGNATURE_ABORT
Sometimes a transaction can fail before it goes to WAL. Then the signature didn't have any sign of it, as well as the journal_entry result (which might be not even created yet). Still if txn_commit/try_async() are called, they invoke on_rollback triggers. The triggers only can see TXN_SIGNATURE_ROLLBACK and can't distinguish it from a real rollback like box.rollback(). Due to that some important errors like a transaction manager conflict or OOM are lost. The patch introduces a new error signature TXN_SIGNATURE_ABORT which says the transaction didn't manage to try going to WAL and for an error need to look at the global diag. The next patch is going to stop overriding it with TXN_SIGNATURE_ROLLBACK. Part of #6027
Showing
- src/box/applier.cc 2 additions, 2 deletionssrc/box/applier.cc
- src/box/box.cc 4 additions, 4 deletionssrc/box/box.cc
- src/box/memtx_engine.c 1 addition, 1 deletionsrc/box/memtx_engine.c
- src/box/txn.c 20 additions, 4 deletionssrc/box/txn.c
- src/box/txn.h 14 additions, 0 deletionssrc/box/txn.h
- src/box/vy_scheduler.c 1 addition, 1 deletionsrc/box/vy_scheduler.c
Loading
Please register or sign in to comment