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

osd: fix _process handling for pg vs slot race #21745

Merged
merged 1 commit into from May 1, 2018

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Apr 30, 2018

No description provided.

@liewegas
Copy link
Member Author

/a/sage-2018-04-30_00:12:46-rados-wip-sage3-testing-2018-04-29-1658-distro-basic-smithi/2453627

We could see the slot with a different PG than we expected if the old
PG was removed and a new one was instantiated in its place.  We can't
just pick up the new PG pointer, however, since it isn't locked.

Fix by retrying with the slot's new pg (possibly null!).  Move this check
below the other cases so that we know we are otherwise consistent with
the slot, since the next pass around we might get pg==null and skip the
to_process.empty() and requeue_seq checks entirely.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas
Copy link
Member Author

liewegas commented May 1, 2018

@gregsfortytwo
Copy link
Member

I don't think I understand. The commit message says to bail out, but we're retrying in the code, and I don't see a check that will cause it to bail on that retry that wouldn't have been invoked the first time around.

@liewegas
Copy link
Member Author

liewegas commented May 1, 2018

The commit was updated but hte PR description wasn't :)

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Greg Farnum gfarnum@redhat.com

@liewegas liewegas merged commit edcbb1b into ceph:master May 1, 2018
@liewegas liewegas deleted the wip-pg-removal-race branch May 1, 2018 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants