A pre-requisite patch for multi-statement transactions.
Refactor statement transaction lifecycle. Avoid nested statement transactions. Make sure there is no more than 1 statement transaction present in the system at the moment. Resolve the bugs this revealed: - in local hot standby we would parasite on the main or script fiber session to process requests. When an assert was added that there is no more than 1 transaction active at a given moment in time, it turned out that transactions running on behalf of local hot standby were running in the scope of session of the run_script or sched fibers. Create and use an own session there. - refactor session on_connect/on_disconnect trigger invocation: do not invoke these triggers for just any session, only for real connects/disconnects (iproto, admin). - split session creation/destruction and trigger invocation Conclude that session storage implementation needs to be done differently.
Showing
- src/admin.cc 2 additions, 9 deletionssrc/admin.cc
- src/box/box.cc 2 additions, 14 deletionssrc/box/box.cc
- src/box/lua/call.cc 32 additions, 45 deletionssrc/box/lua/call.cc
- src/box/lua/call.h 1 addition, 2 deletionssrc/box/lua/call.h
- src/box/recovery.cc 11 additions, 0 deletionssrc/box/recovery.cc
- src/box/request.cc 18 additions, 46 deletionssrc/box/request.cc
- src/box/request.h 1 addition, 1 deletionsrc/box/request.h
- src/box/txn.cc 44 additions, 17 deletionssrc/box/txn.cc
- src/box/txn.h 6 additions, 2 deletionssrc/box/txn.h
- src/iproto.cc 7 additions, 3 deletionssrc/iproto.cc
- src/lib/small/mempool.h 4 additions, 0 deletionssrc/lib/small/mempool.h
- src/lua/init.cc 0 additions, 5 deletionssrc/lua/init.cc
- src/session.cc 26 additions, 19 deletionssrc/session.cc
- src/session.h 18 additions, 2 deletionssrc/session.h
- test/box/session.storage.result 1 addition, 1 deletiontest/box/session.storage.result
Loading
Please register or sign in to comment