xrow: introduce struct synchro_request
All requests saved to WAL and transmitted through network have their own request structure with parameters: - struct request for DML; - struct call_request for CALL/EVAL; - struct auth_request for AUTH; - struct ballot for VOTE; - struct sql_request for SQL; - struct greeting for greeting. It is done for a reason - not to pass all the request parameters into each function one by one, and manage them all at once instead. For synchronous requests IPROTO_CONFIRM and IPROTO_ROLLBACK it was not done. Because so far it was not too hard to carry just 2 parameters: lsn and replica_id, from their body. But it will be changed in #5129. Because in fact these requests have more parameters, but they were filled by txn module, since synchro requests were saved to WAL via transactions (due to lack of alternative API to access WAL). After #5129 it will be necessary to save LSN and replica_id of the request author. This patch introduces struct synchro_request to simplify extension of the synchro parameters. Closes #5151 Needed for #5129
Showing
- src/box/applier.cc 6 additions, 26 deletionssrc/box/applier.cc
- src/box/box.cc 5 additions, 16 deletionssrc/box/box.cc
- src/box/txn_limbo.c 37 additions, 20 deletionssrc/box/txn_limbo.c
- src/box/txn_limbo.h 4 additions, 11 deletionssrc/box/txn_limbo.h
- src/box/xrow.c 13 additions, 40 deletionssrc/box/xrow.c
- src/box/xrow.h 30 additions, 33 deletionssrc/box/xrow.h
Loading
Please register or sign in to comment