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

test(replication_test) : add replica flushall test #669

Merged
merged 3 commits into from
Jan 15, 2023
Merged

Conversation

adiholden
Copy link
Collaborator

Signed-off-by: adi_holden adi@dragonflydb.io

Signed-off-by: adi_holden <adi@dragonflydb.io>
@adiholden adiholden requested a review from dranikpg January 11, 2023 12:50
Signed-off-by: adi_holden <adi@dragonflydb.io>
Check replica keys at the end.
"""

@dfly_args({"logtostdout":"", "vmodule":"replica=2"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this, if you need this when running, you can do pytest ... --df logtostdout --df vmodule=replica=2

Comment on lines 342 to 343
for i in range(n_keys):
pipe.mset({f"{i}": "v", f"{i+1}": "v"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You set all the keys twice, or is this intended? You can use range(step=2) to skip over one

Besides, I have also utils.chunked() that can split an iterable into chunks, so you can use mset with a generic number of keys. Probably not needed here as you start them with 4/2 threads

Signed-off-by: adi_holden <adi@dragonflydb.io>
@adiholden adiholden requested a review from dranikpg January 12, 2023 12:18
@adiholden adiholden merged commit cee7a9e into main Jan 15, 2023
@romange romange deleted the test_flushall branch February 18, 2023 16:07
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.

2 participants