-
Notifications
You must be signed in to change notification settings - Fork 377
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: cover split-brain during promote #9944
base: master
Are you sure you want to change the base?
Conversation
e6c6a8c
to
a0cdee6
Compare
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.
Thanks for the patch!
t.helpers.retrying({}, function() | ||
t.assert_not_equals(g.rs.servers[1]:grep_log('ER_SPLIT_BRAIN'), nil) | ||
end) |
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.
Can you instead get it from the info.replication
from upstream/downstream status? Log greps is the last resort.
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.
Sure, it's better to check box.info.replication.upstream
a0cdee6
to
29c2e76
Compare
This test checks, that when PROMOTE from the previous term is encountered we immediately notice split-brain situation and break replication without corrupting data. Closes tarantool#9943 NO_DOC=test NO_CHANGELOG=test
29c2e76
to
71f904d
Compare
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.
Thanks for the test!
Please consider adding this case to the test/replication-luatest/gh_5295_split_brain_test.lua
test. It contains all the similar split-brain test cases. I was sure that the case with an old promote is also handled there, but apparently it's not.
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.
Thanks for the test!
This test checks, that when PROMOTE from the prevous term is encountered we immediately notice split-brain situation and break replication without corrupting data.
Closes #9943
NO_DOC=test
NO_CHANGELOG=test