-
Notifications
You must be signed in to change notification settings - Fork 998
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: add test_cache_cluster_data_migration #4435
base: main
Are you sure you want to change the base?
Conversation
8555c1d
to
a023cae
Compare
e4f3fdc
to
30094db
Compare
30094db
to
20c3c91
Compare
20c3c91
to
334a081
Compare
334a081
to
baf2978
Compare
|
||
gen_stop = False | ||
|
||
async def expiration_gen(): |
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.
you can use ExpirySeeder
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 will check
i = 0 | ||
try: | ||
while not gen_stop: | ||
await nodes[0].client.execute_command(f"SET exp_key_{i} val_{i} EX 20") |
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.
When I run your test the first call here gets OOM exeptions therefor no command here is executed
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 it's ok if test is finished successfully
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.
but it sometimes fails at least for me
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.
it's interesting, where?
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.
last assertion assert stats["expired_keys"] > 0
fill_exp_task = asyncio.create_task(expiration_gen()) | ||
|
||
# some time to fill data | ||
await asyncio.sleep(20) |
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.
why 20 seconds?
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.
to fill enough data and start some keys expire
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.
the first debug populate fills enough data for evictions as far as I understand.
also you can use a smaller expiration time to check expiry f.e 2 seconds
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.
2 seconds isn't enough because it's random
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.
what is random?
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.
we don't know what the slot of the next key and if the interval is small we can get already migrated slots keys or they will expire before migration
fixes: #4354