txn: do not require space id for nop requests
Currently, IPROTO_NOP can only be generated by a before_replace trigger, when it returns the old tuple thus turning the original operation into a NOP. In such a case we know the space id and we write it to the request body. This allows us to dispatch NOP requests via DML route. As a part of replica local spaces feature, we will substitute requests operating on local spaces with NOP in relay in order to promote vclock on replicas without actual data modification. Since space_id is stored in request body, sending it to replicas would mean decoding the request body in relay, which is an overkill. To avoid that, let's separate NOP and DML paths and remove space_id from NOP requests. Needed for #3443
Showing
- src/box/box.cc 21 additions, 0 deletionssrc/box/box.cc
- src/box/iproto_constants.c 1 addition, 1 deletionsrc/box/iproto_constants.c
- src/box/request.c 5 additions, 2 deletionssrc/box/request.c
- src/box/txn.c 40 additions, 38 deletionssrc/box/txn.c
- test/box/before_replace.result 2 additions, 2 deletionstest/box/before_replace.result
- test/box/before_replace.test.lua 1 addition, 1 deletiontest/box/before_replace.test.lua
- test/box/on_replace.result 2 additions, 2 deletionstest/box/on_replace.result
Loading
Please register or sign in to comment