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(streamer): Do not yield from the Traverse callback. #2638

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented Feb 21, 2024

Yielding inside the callback can move entries within the bucket, which is unsupported.

Yielding inside the callback can move entries within the bucket, which
is unsupported.
cursor =
pt->Traverse(cursor, [this](PrimeTable::bucket_iterator it) { WriteBucket(it, true); });
cursor = pt->Traverse(cursor, absl::bind_front(&RestoreStreamer::WriteBucket, this));
NotifyWritten(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I dont think its good to call NotifyWritten if nothing was written to buff

@chakaz chakaz merged commit 9baf7c2 into main Feb 21, 2024
10 checks passed
@chakaz chakaz deleted the streamer-traverse branch February 21, 2024 18:26
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.

None yet

2 participants