replication: send current Raft term in join response
Make Raft nodes send out their latest persisted term to joining replicas. This is needed to avoid the situation when txn_limbo-managed 'promote greatest term' is greater than current Raft term. Otherwise the following may happen: replica joins off some instance and receives its latest limbo state. The state includes "greatest term seen" and makes limbo filter out any data coming from instances with smaller terms. Imagine that master this replica has joined from dies before replica has a chance to subscribe to it. Then it doesn't receive its current Raft term and start elections at smallest term possible, 2 (when there are no suitable Raft nodes besides the replica). Once the elections in a small term number are won, a ton of problems arises: starting with filtering out PROMOTE requests for "old" term and nop-ifying any data coming from terms smaller than "greatest term seen". Prerequisite #6034
Loading
Please register or sign in to comment