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
PG: primary should not be in the peer_info, skip if it is #20189
Conversation
@neha-ojha I'm enhancing this function right now. Actually, the primary is never in peer_info, so I'm not clear this is needed. Did you see this happen or was this from code inspection? |
@dzafman I hit this assert Adding some debug logs showed the following:
2 being the primary here was getting added twice. |
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.
Let's add a comment that this shouldn't be needed because the primary should be in the peer_info.
@neha-ojha Also, change the commit comment to reflect that the primary isn't supposed to be in peer_info. |
Signed-off-by: Neha Ojha <nojha@redhat.com>
504a359
to
921f111
Compare
@dzafman we've got a bunch of loops over peer_* data structures that explicitly skip the primary - it does seem like a bad pattern, but they seem to be preventing bugs for now. |
@jdurgin Yes, I talked with @neha-ojha about it. I created a tracker to figure out later why primary is ending up in peer_info. http://tracker.ceph.com/issues/22834 |
Skip the primary when iterating over peer_info to avoid adding the primary twice.
Signed-off-by: Neha Ojha nojha@redhat.com