replication: do not relay rows coming from a remote instance back to it
We have a mechanism for restoring rows originating from an instance that suffered a sudden power loss: remote masters resend the isntance's rows received before a certain point in time, defined by remote master vclock at the moment of subscribe. However, this is useful only on initial replication configuraiton, when an instance has just recovered, so that it can receive what it has relayed but haven't synced to disk. In other cases, when an instance is operating normally and master-master replication is configured, the mechanism described above may lead to instance re-applying instance's own rows, coming from a master it has just subscribed to. To fix the problem do not relay rows coming from a remote instance, if the instance has already recovered. Closes #4739
Showing
- src/box/applier.cc 6 additions, 1 deletionsrc/box/applier.cc
- src/box/wal.c 3 additions, 0 deletionssrc/box/wal.c
- src/lib/core/cbus.h 7 additions, 0 deletionssrc/lib/core/cbus.h
- src/lib/core/errinj.h 2 additions, 1 deletionsrc/lib/core/errinj.h
- test/box/errinj.result 1 addition, 0 deletionstest/box/errinj.result
- test/replication/gh-4739-vclock-assert.result 88 additions, 0 deletionstest/replication/gh-4739-vclock-assert.result
- test/replication/gh-4739-vclock-assert.test.lua 36 additions, 0 deletionstest/replication/gh-4739-vclock-assert.test.lua
- test/replication/suite.cfg 1 addition, 0 deletionstest/replication/suite.cfg
- test/replication/suite.ini 1 addition, 1 deletiontest/replication/suite.ini
Loading
Please register or sign in to comment