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

chore: singlehop XREAD #3817

Merged
merged 1 commit into from
Sep 28, 2024
Merged

chore: singlehop XREAD #3817

merged 1 commit into from
Sep 28, 2024

Conversation

dranikpg
Copy link
Contributor

Refactoring broke single shard single hop xread, here it is again

Signed-off-by: Vladislav Oleshko <[email protected]>
@@ -2948,21 +2948,33 @@ void XReadGeneric2(CmdArgList args, ConnectionContext* cntx, bool read_group) {

auto* tx = cntx->transaction;

// Determine if streams have entries
// Determine if streams have entries or any error occured
AggregateValue<optional<facade::ErrorReply>> err;
atomic_bool have_entries = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why atomic_bool? hops ensure sequential memory order in the coordinator so seems can be done with a regular bool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Concurrently writes? 🙂

@dranikpg dranikpg merged commit 753a780 into dragonflydb:main Sep 28, 2024
9 checks passed
@dranikpg dranikpg deleted the fast-xread branch October 20, 2024 14:55
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.

2 participants