rebuild replication backlog index when master restart#9720
rebuild replication backlog index when master restart#9720oranagra merged 1 commit intoredis:unstablefrom
Conversation
|
@soloestoy can you please add some details in the top comment. |
|
ok, so we forgot to re-build the rax in loadDataFromDisk, don't we have a test that should have failed? |
|
Thanks @soloestoy we already updated replication buffer blocks' offset, so tests are passed. |
|
ohh, so the implications of this bug was just a slow search, but not a replication failure? |
Yes, I think it doesn't lead to replication failure or data inconsistency.
By reading the code... I missed some PRs code review, and recently have time to review them. |
After PR #9166 , replication backlog is not a real block of memory, just contains a reference points to replication buffer's block and the blocks index (to accelerate search offset when partial sync), so we need update both replication buffer's block's offset and replication backlog blocks index's offset when master restart from RDB, since the
server.master_repl_offsetis changed.The implications of this bug was just a slow search, but not a replication failure.