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 cluster: migration crash fix #4508

Merged
merged 2 commits into from
Jan 27, 2025
Merged

fix cluster: migration crash fix #4508

merged 2 commits into from
Jan 27, 2025

Conversation

adiholden
Copy link
Collaborator

@adiholden adiholden commented Jan 26, 2025

fix #4455
This PR:

  1. fix crash in in registered callbacks:
    The bug - calling bucket iterator get version will fail if bucket iterator is not valid. This case can happen when we have few callbacks executed on flush changes on earlier buckets. If the first one will remove all data from the bucket, the next call to the next registered callback will call Seek2Occupied and if the bucket is empty the iterator will be invalid.
  2. add more test for cluster migration, running traffic while operating several migrations

@adiholden adiholden requested a review from BorysTheDev January 26, 2025 19:23
@adiholden adiholden merged commit b4ef0a0 into main Jan 27, 2025
17 checks passed
@adiholden adiholden deleted the more_migration_tests branch January 27, 2025 08:39
@@ -716,14 +716,15 @@ void DbSlice::FlushSlotsFb(const cluster::SlotSet& slot_ids) {
PrimeTable* table = GetTables(db_index).first;

auto iterate_bucket = [&](DbIndex db_index, PrimeTable::bucket_iterator it) {
it.AdvanceIfNotOccupied();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Have you considered fixing it in dash code? @adiholden
seems weird that callbacks are called with invalid iterators and you need to check them or advance them yourself.

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.

Dragonfly crashes during migrations
3 participants