Skip to content

Conversation

@soloestoy
Copy link
Contributor

@soloestoy soloestoy commented Nov 2, 2021

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_offset is changed.
The implications of this bug was just a slow search, but not a replication failure.

@oranagra
Copy link
Member

oranagra commented Nov 2, 2021

@soloestoy can you please add some details in the top comment.

@oranagra
Copy link
Member

oranagra commented Nov 2, 2021

ok, so we forgot to re-build the rax in loadDataFromDisk, don't we have a test that should have failed?
i.e. one that attempts to psync from a restarted master?

@ShooterIT
Copy link
Member

ShooterIT commented Nov 2, 2021

Thanks @soloestoy
I think we don't index replication buffer blocks which are generated during loading, this makes it slow to search offset when partial sync if there are many expire keys, we need to search from the first node since there is no index.

we already updated replication buffer blocks' offset, so tests are passed.

@oranagra
Copy link
Member

oranagra commented Nov 2, 2021

ohh, so the implications of this bug was just a slow search, but not a replication failure?
@soloestoy mind telling us how did you find it?

@soloestoy
Copy link
Contributor Author

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.

@soloestoy mind telling us how did you find it?

By reading the code... I missed some PRs code review, and recently have time to review them.

@oranagra oranagra merged commit d08f055 into redis:unstable Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants