Xread last entry in stream (#7388)#13117
Merged
oranagra merged 7 commits intoredis:unstablefrom Mar 13, 2024
Merged
Conversation
when '+' is used as item ID in XREAD command, return the last item in the stream (provided the stream is not empty). Reduce the stream last ID by one and start searching from there.
de9f9cb to
a48443b
Compare
a48443b to
8f3426a
Compare
Collaborator
|
i guess that your editor formats the file automatically. |
sundb
reviewed
Mar 7, 2024
oranagra
reviewed
Mar 7, 2024
when '+' is used as item ID in XREAD command, return the last item in the stream (provided the stream is not empty). Reduce the stream last ID by one and start searching from there.
sundb
reviewed
Mar 8, 2024
Member
|
@redis/core-team please approve |
guybe7
reviewed
Mar 11, 2024
Member
|
approved in a core-team meeting. |
sundb
added a commit
that referenced
this pull request
Aug 14, 2024
Fixed a missing from #13117. When the number of streams is incorrect, the error message for `XREAD` needs to include the '+' symbol.
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
Allow using `+` as a special ID for last item in stream on XREAD command. This would allow to iterate on a stream with XREAD starting with the last available message instead of the next one which `$` is used for. I.e. the caller can use `BLOCK` and `+` on the first call, and change to `$` on the next call. Closes redis#7388 --------- Co-authored-by: Felipe Machado <[email protected]>
funny-dog
pushed a commit
to funny-dog/redis
that referenced
this pull request
Sep 17, 2025
Fixed a missing from redis#13117. When the number of streams is incorrect, the error message for `XREAD` needs to include the '+' symbol.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow using
+as a special ID for last item in stream on XREAD command.This would allow to iterate on a stream with XREAD starting with the last available message instead of the next one which
$is used for.I.e. the caller can use
BLOCKand+on the first call, and change to$on the next call.Closes #7388