-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improve empty stream responses deserialization #1022
Conversation
The CI failures look legit. |
Sorry, I utterly failed my attempt to rebase on |
You need to handle older redises in the test suite. |
test/streams_test.rb
Outdated
class TestStreams < Minitest::Test | ||
include Helper::Client | ||
|
||
def test_read_a_trimmed_entry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in https://github.com/redis/redis-rb/blob/master/test/lint/streams.rb (that will give you the automatic skip if redis is too old)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the test and moved it with other xreadgroup
tests ✅
Thank you. |
This is to fix an error that still happens despite #905:
When attempting to read trimmed, pending messages for a consumer group from a stream, we still get
This is because Redis keeps the entry_id despite the entry itself having been deleted, and will respond with, eg:
The branch provides a spec to reproduces the issue and validate the fix. Let me know if you need me to do changes.
And thanks for this great gem 👍
PS: This is related to the bug mentioned in issues #936, #929. Although I wasn't able to reproduce the issue with XCLAIM, potentially thanks to the previous fix in #905