-
Notifications
You must be signed in to change notification settings - Fork 876
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: forbid parallel save operations #2172
Conversation
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 like the approach. Please double check which state switches rely on the final state (regardless of switch) and which rely solely on the switch (I assume it's even only the one in the issue)... If the regression tests pass it should be close to correct 😆
please add a regression test that issues 2 save commands at the same time and make sure one of them is rejected |
bc5065f
to
f6874be
Compare
3cb6ade
to
3d05906
Compare
tests/dragonfly/replication_test.py
Outdated
@@ -1685,7 +1685,7 @@ async def test_network_disconnect_small_buffer(df_local_factory, df_seeder_facto | |||
# Df is blazingly fast, so by the time we tick a second time on | |||
# line 1674, DF already replicated all the data so the assertion | |||
# at the end of the test will always fail | |||
fill_task = asyncio.create_task(seeder.run()) | |||
fill_task = asyncio.create_task(seeder.run(target_ops=40000000)) |
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 did you add target_ops?
The flow of the test should be seeder run until we call below seeder.stop()
What was failing that caused you to change this?
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 test failed on the build machine, but locally everything was correct. So according to comments I've increased target_ops
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.
This comment was written in this PR https://github.com/dragonflydb/dragonfly/pull/1970/files and I believe its not relevant now as we dont use target ops. We need to find why this failed but for now please remove this change.
#2165