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: xread fixes #1318

Merged
merged 2 commits into from
Sep 29, 2023
Merged

fix: xread fixes #1318

merged 2 commits into from
Sep 29, 2023

Conversation

ullumullu
Copy link
Contributor

A set of bugfixes for the XREAD command. Consult the individual commits for details.

The syntax for an XREAD command is

```
XREAD [COUNT count] [BLOCK milliseconds] STREAMS key [key ...] id
  [id ...]
```

Before this fix the implementation used

```
XREAD [COUNT count] [BLOCK milliseconds] STREAMS key id [key id...]
```

The new approach should be equally fast and provide the correct results. Also
adjusted existing tests.

Links:
https://redis.io/commands/xread/
It needs to wait until the timeElapsed is greater or eq the defined blocking time.
The test was enhanced to spot the issue and verify the fix worked. This
uncovered another issue with the way found events are evaluated to always return
even without any event received. This problem is also fixed by this commit.
Copy link
Owner

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

Thanks!! ✨

@stipsan stipsan merged commit 3978302 into stipsan:main Sep 29, 2023
12 of 14 checks passed
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