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

mon/MonClient: cancel pending commands on shutdown #15227

Merged
merged 2 commits into from May 26, 2017

Conversation

Projects
None yet
3 participants
@tchaikov
Contributor

tchaikov commented May 23, 2017

@tchaikov tchaikov added the bug fix label May 23, 2017

@tchaikov tchaikov requested review from liewegas and jdurgin May 24, 2017

@@ -408,7 +408,9 @@ void MonClient::shutdown()
delete version_requests.begin()->second;
version_requests.erase(version_requests.begin());
}
for (const auto cmd : mon_commands) {
_cancel_mon_command(cmd.first);

This comment has been minimized.

@liewegas

liewegas May 24, 2017

Member

this modifies mon_commands(). Does the magic for syntax advance the iterator before executing the body? i'm guessing not, in which case you should do a while (!mon_commands.empty()) { auto& cmd = mon_commands.begin()->first; ...

tchaikov added some commits May 23, 2017

mon/MonClient: drop unused param
Signed-off-by: Kefu Chai <kchai@redhat.com>
mon/MonClient: cancel pending commands on shutdown
Fixes: http://tracker.ceph.com/issues/20051
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented May 24, 2017

@liewegas fixed and pushed. as the code is copied literally from your comment, so i added your "Signed-off-by" in the commit message of the second commit.

@liewegas liewegas merged commit 0f01014 into ceph:master May 26, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@tchaikov tchaikov deleted the tchaikov:wip-20051 branch May 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment