-
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
chore: Add FakeRedis capture/compare to more cluster tests and seed during migration #4542
base: main
Are you sure you want to change the base?
Conversation
Note that we can't add such a test to `test_cluster_native_client` because we don't do a migration there, just re-assign slots, meaning that data is lost (by desgin?) Fixes #4429
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.
If I remember correctly this is because data sent during migrations would not be captured right ?
This is just a "free" step, which we compare ourselves to FakeRedis. Sort of sanity check to see that we behave like Redis does. We're supposed to take this further and seed during migration, then compare to FakeRedis. So far we didn't do it because we didn't have anything to compare against, as traffic sent during migration was only available to the target node once the migration finished. |
@kostasrim I now added the remainder of the tests (originally I thought about doing so in a separate PR, but I gave up on that due to time considerations). |
tests/dragonfly/cluster_test.py
Outdated
|
||
await nodes[1].client.execute_command( | ||
"DFLY", | ||
"LOAD", | ||
"snap_during_migration-summary.dfs", | ||
) | ||
|
||
assert await seeder.compare(capture_before_migration, nodes[1].instance.port) | ||
# TBD: We can't compare the post-loaded data with anything because it is saved while we seed |
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 think you can still do this check if save will run before you start seeding traffic that will run during the migration.
you will need to first run
await seeder.run(target_deviation=0.1)
to fill the server with data
and than create a capture and compare it at the end
Note that we can't add such a test to
test_cluster_native_client
because we don't do a migration there, just re-assign slots, meaning that data is lost (by desgin?)Fixes #4429