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_family): Fix replication for the XADD and XTRIM commands #4591

Conversation

BagritsevichStepan
Copy link
Contributor

@BagritsevichStepan BagritsevichStepan commented Feb 11, 2025

Following this comment, this PR reverts the changes to the Redis code made in the PR #4448.

Some of the logic is copied from the Seeder's PR:

...
3. Fix bug when the whole stream was removed after trimming
4. Add full removal to the Python test
5. Add logs to the XADD command

Also, I added hash calculation for the streams in the seeder here, so StaticSeeder.capture works correctly. The test_stream_approximate_trimming test passes, confirming that the replication logic works properly.

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
@BagritsevichStepan BagritsevichStepan merged commit 6079d81 into dragonflydb:main Feb 11, 2025
10 checks passed
@BagritsevichStepan BagritsevichStepan deleted the stream/fix-stream-replication branch February 11, 2025 15:37
adiholden pushed a commit that referenced this pull request Mar 26, 2025
…4591)

* chore(stream): Revert changes in the redis code

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* fix(stream_family): Fix replication for the XADD and XTRIM commands

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
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