Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: awakened_keys inconcistency #2517

Merged
merged 2 commits into from
Feb 1, 2024
Merged

Fix: awakened_keys inconcistency #2517

merged 2 commits into from
Feb 1, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Feb 1, 2024

  1. Remove the duplicated FinalizeWatched function
  2. Identify the case where we delete the watched queue while we may still have awakedened_keys pointing to it.
  3. Add a test reproducing the issue of having in awakened_keys an untangled key.

Properly fixes #2514

1. Remove the duplicated FinalizeWatched function
2. Identify the case where we delete the watched queue while we may still have awakedened_keys pointing to it.
3. Add a test reproducing the issue of having in awakened_keys an untangled key.

Properly fixes #2514

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange
Copy link
Collaborator Author

romange commented Feb 1, 2024

@romange romange marked this pull request as ready for review February 1, 2024 10:05
@@ -214,6 +178,8 @@ void BlockingController::NotifyPending() {
DVLOG(1) << "Processing awakened key " << sv_key;
auto w_it = wt.queue_map.find(sv_key);
if (w_it == wt.queue_map.end()) {
// This should not happen because we remove keys from awakened_keys every type we remove
// the entry from queue_map. TODO: to make it a CHECK after Dec 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I foresee us totally missing this line in december 🤣

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can grep TODOs from time to time and Dec is purely directional :)

@romange romange merged commit adeac6b into main Feb 1, 2024
10 checks passed
@romange romange deleted the Pr1 branch February 1, 2024 12:19
@romange romange changed the title Pr1 Fix: awakened_keys inconcistency Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash with blocking commands
2 participants