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/ReplicatedPG: be more careful about calling publish_stats_to_osd() #8039

Merged
merged 1 commit into from
Mar 17, 2016

Conversation

gregsfortytwo
Copy link
Member

We had moved the call out of eval_repop into a lambda, but that left out
a few other code paths and is fragile. So just call it unconditionally in
eval_repop() instead.

Fixes: #14962

Signed-off-by: Greg Farnum gfarnum@redhat.com

@gregsfortytwo
Copy link
Member Author

@athanatos I'll test this through the FS suite but can you check if my reasoning makes any sense?
http://tracker.ceph.com/issues/14962

@@ -8303,6 +8301,7 @@ void ReplicatedPG::eval_repop(RepGather *repop)
repop->on_committed.erase(p++)) {
(*p)();
}
publish_stats_to_osd();
Copy link
Member

Choose a reason for hiding this comment

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

I think this should go a bit further down, here https://github.com/ceph/ceph/pull/8039/files#diff-72747d40a424e7b5404366b557ff12a3R8357 next to calc_min_last_complete_ondisk(). We could also do it as an on_complete lambda, but I think it makes sense to do this unconditionally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Uh, maybe? This is where it was located previously, and immediately follows where it would be called as part of an on_complete lambda, so I put it back as that's the minimal change and I'm unsure if there are any side effects to be worried about. (Though I definitely don't see anything that makes me think publish_stats_to_osd() is sensitive to much of anything.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, next to calc_min_last_complete_ondisk would be better.

…rrectly

We had moved the call out of eval_repop into a lambda, but that left out
a few other code paths and is fragile. So just call it unconditionally in
eval_repop() when we're done with the repop instead.

Fixes: ceph#14962

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
@gregsfortytwo gregsfortytwo force-pushed the wip-14962-greg branch 2 times, most recently from f62a73d to d9af48a Compare March 12, 2016 00:59
@liewegas liewegas added this to the jewel milestone Mar 14, 2016
gregsfortytwo added a commit that referenced this pull request Mar 14, 2016
@gregsfortytwo
Copy link
Member Author

@gregsfortytwo
Copy link
Member Author

@athanatos @liewegas can we merge this now? :)

@gregsfortytwo gregsfortytwo changed the title DNM: ReplicatedPG: be more careful about calling publish_stats_to_osd() ReplicatedPG: be more careful about calling publish_stats_to_osd() Mar 17, 2016
@liewegas liewegas changed the title ReplicatedPG: be more careful about calling publish_stats_to_osd() osd/ReplicatedPG: be more careful about calling publish_stats_to_osd() Mar 17, 2016
liewegas added a commit that referenced this pull request Mar 17, 2016
osd/ReplicatedPG: be more careful about calling publish_stats_to_osd()

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit c021e1b into ceph:master Mar 17, 2016
@gregsfortytwo gregsfortytwo deleted the wip-14962-greg branch July 27, 2016 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants