]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/MonClient: make get_mon_log_message() atomic 14587/head
authorKefu Chai <kchai@redhat.com>
Mon, 10 Apr 2017 06:53:46 +0000 (14:53 +0800)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Mon, 17 Apr 2017 10:12:45 +0000 (14:12 +0400)
commit527911fab78b4752313a4a2a5d3ab0ae736bc50f
tree26777273cefc0f5fc830a9937714573035e9be9b
parente31a540dcea96b3d5b4f7ecd20e2d54e81a68e2b
mon/MonClient: make get_mon_log_message() atomic

* LogClient: move reset_session() into get_mon_log_message() and add a
  "flush" param to the latter. so it can get_mon_log_message()
  atomically. otherwise another call changing the log queue could sneak
  in between reset_session() and get_mon_log_message().
* MonClient: add a "flush" param to do_send() so we can reset the
  LogClient session once we are connected to a monitor.

Fixes: http://tracker.ceph.com/issues/19427
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5215e291da2b527d85e129eda86043490843178e)

Conflicts:
src/mon/MonClient.cc: handle_auth: replaced 'log_client->reset_session();
send_log();' sequence with newly introduced 'send_log(true);' like
the original patch does
src/common/LogClient.cc
src/common/LogClient.h
src/mon/MonClient.cc
src/mon/MonClient.h