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 traverse bug #4279

Merged
merged 1 commit into from
Dec 9, 2024
Merged

Conversation

adiholden
Copy link
Collaborator

The bug:
Dash table traverse function assumes that the cb does not preempts
the traverse applies the cb on each slot of the logical bucket.
In our flow the registered cb WriteBucket can preempt and therefore after preempting the assertion for iterating each slot of the bucket is triggered
F20241208 21:35:59.052592 21717 init.cc:25] [../src/core/dash_internal.h:1587]: assert(BucketIndex(hfun(bucket->key[slot])) == bid) failed!

the bug was discovered in the following regression run
https://github.com/dragonflydb/dragonfly/actions/runs/12225241118/job/34098992760

The fix:
We lately introduced an new dash table function TraveseBucket that iterate on physical bucket and it applies the cb on the bucket only once. It is used in snapshoting now to support big value serialization wich can preempt and it also improves the flow as it applies the cb only once on a bucket and not multiple times for each bucket slot.

Signed-off-by: adi_holden <adi@dragonflydb.io>
@adiholden adiholden merged commit d2f479b into main Dec 9, 2024
9 checks passed
@adiholden adiholden deleted the fix_cluter_migration_traverse branch December 9, 2024 11:22
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.

3 participants