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 Stream Lag and Add EntriesAdded/EntriesRead #377

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sancar
Copy link

@sancar sancar commented Jun 6, 2024

Added them according to redis spec described here
https://redis.io/docs/latest/commands/xinfo-groups/

@alicebob
Copy link
Owner

alicebob commented Jun 6, 2024 via email

@sancar
Copy link
Author

sancar commented Jun 7, 2024

@alicebob I realized that there are some behavior differences with Redis. entries-read sometimes should be Nil instead of zero. I will update the pr shortly.

@alicebob
Copy link
Owner

alicebob commented Jun 7, 2024 via email

@sancar
Copy link
Author

sancar commented Jun 7, 2024

@alicebob
The problem is that redis is not behaving according to spec, if I am not getting it wrong :)
See especially TestStreamDelete . The test as it is follows spec. The redis implementation(7.2.3) expects it to be like this
https://gist.github.com/sancar/a20791cfaa7998974593e63445a1325f
== EDIT==
I have deleted the gist but added the same thing to your integration tests. I think, it shows the problem much better.

Which one is your preference redis implementation or redis spec for miniredis ?

@alicebob
Copy link
Owner

alicebob commented Jun 7, 2024 via email

@sancar
Copy link
Author

sancar commented Jun 7, 2024

Dear @alicebob,

I was really happy with our relationship. It was working out smoothly so far. It's hard for me to say this, but it seems like this is the end of our relationship. It's not about you; it's about Redis.

From this point forward, I'll have to fork miniredis and continue alone.

I've added integration tests to demonstrate the disparities between Redis's specifications and its actual behavior. I plan to report this to Redis as a bug. If someday the planets align perfectly (Redis fixes the bug, MiniRedis adjusts its tests), then perhaps we can get together.

I'm uncertain about what to do with this pull request. Honestly, I'm not keen on trying to understand and implement buggy behavior.

Sincerely,
@sancar from Upstash.

@alicebob
Copy link
Owner

alicebob commented Jun 7, 2024 via email

@sancar
Copy link
Author

sancar commented Jun 7, 2024

I think you will consider the doc correct but implementation buggy after spending some time on it.
I will follow this thread to get your ideas as well.

@alicebob
Copy link
Owner

alicebob commented Jun 7, 2024 via email

@alicebob
Copy link
Owner

Hi, started looking at this today, but figuring out what Redis is up to took long and I couldn't finish that today. Just heads up I haven't forgotten :)

@sancar
Copy link
Author

sancar commented Jun 12, 2024

Hi @alicebob , I think we can wait a bit for these to be clarified.
redis/redis#13337
redis/redis#13338

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