Sentinel: fix a free-after-use issue re-registering Sentinels.#10333
Merged
yossigo merged 4 commits intoredis:unstablefrom Feb 23, 2022
Merged
Sentinel: fix a free-after-use issue re-registering Sentinels.#10333yossigo merged 4 commits intoredis:unstablefrom
yossigo merged 4 commits intoredis:unstablefrom
Conversation
Collaborator
|
@moticless I'm still getting failures: |
added 2 commits
February 23, 2022 16:47
…edis into sentinel-macos-sanitizer-fix
Collaborator
Author
|
@yossigo, I fixed a memory issue ... by adding new one :) I slipped in test due to toggling between build layouts... Tested as expected this time. Thanks. |
hwware
added a commit
to hwware/redis
that referenced
this pull request
Feb 23, 2022
Follow redis#10333
yossigo
approved these changes
Feb 23, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In case HELLO message received from another sentinel, with same address like another instance registered in the past but with different runid. Then there was cumbersome logic to modify the instance the port to 0 to in order to mark as invalid and later on to delete it. But the deletion is happening during update of instances in such a way that we might end up accessing an instance that was deleted just before.
Didn't find a good reason why to postpone the deletion action of an obsolete instance (deletion is taking place instantly, for other cases ) -> Lets delete at once
There is a mixture of logic of Sentinel address update with the logic of deletion of Sentinels that match a given Address -> Split to two!