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

rbd-mirror: improve split-brain detection logic #10703

Merged
merged 8 commits into from Aug 17, 2016
Merged

Conversation

dillaman
Copy link

@dillaman dillaman commented Aug 12, 2016

@trociny trociny self-assigned this Aug 14, 2016
trociny pushed a commit that referenced this pull request Aug 14, 2016
 rbd-mirror: improve split-brain detection logic #10703
@@ -982,6 +982,10 @@ void ImageReplayer<I>::allocate_local_tag() {
predecessor_mirror_uuid = librbd::Journal<>::LOCAL_MIRROR_UUID;
}

dout(20) << "mirror_uuid=" << mirror_uuid << ", "
<< "predecessor_mirror_uuid=" << predecessor_mirror_uuid << ", "
<< "replay_tag_tid=" << m_replay_tag_tid << " ,"
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: s/" ,"/", "/

@dillaman
Copy link
Author

@trociny update pushed

ASSERT_EQ(0, ctx.wait());
}

TEST_F(TestMockImageReplayerBootstrapRequest, SplinBrainForcePromote) {
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Splin/Split/

predecessor_commit_valid ? "true" : "false");
f->dump_unsigned("predecessor_tag_tid", predecessor_tag_tid);
f->dump_unsigned("predecessor_entry_tid", predecessor_entry_tid);
predecessor.dump(f);
Copy link
Contributor

Choose a reason for hiding this comment

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

@dillaman Add "predecessor" section here or "predecessor_" prefix for fields in TagPredecessor::dump? Otherwise the output might look confusing.

Jason Dillaman added 2 commits August 16, 2016 09:09
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Jason Dillaman added 6 commits August 16, 2016 09:11
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
A non-primary image's commit possition won't accurately reflect
the current demotion/promotion chain. Therefore, directly specify
the predecessor for promotion events.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
@dillaman
Copy link
Author

@trociny updates pushed

@trociny
Copy link
Contributor

trociny commented Aug 17, 2016

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants