]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: PaxosService: use wait_for_.*_ctx() in absence of an op
authorJoao Eduardo Luis <joao@suse.de>
Thu, 18 Jun 2015 13:55:19 +0000 (14:55 +0100)
committerJoao Eduardo Luis <joao@suse.de>
Thu, 16 Jul 2015 17:06:08 +0000 (18:06 +0100)
commit677372d8d8d68fb2a207e279622c7a8382a4c927
tree2bfe341e10eeafb53b1201449a0b91d842a3eb99
parentd240a76d44c35dd51b215bbe47ab95c4283f5c3a
mon: PaxosService: use wait_for_.*_ctx() in absence of an op

The vast majority of cases use PaxosService's wait_for_{state}()
functions to wait on given {state} before waking up a given op-related
callback.  E.g., to reply to a command once a proposal finishes.

However, there are a few cases[1] in which the callback waiting for the
state change does not map to an op.

To maintain compatibility, we were keeping the functions just taking a
callback and no op with the same name as those taking ops (because c++
is amazing that way), but we realized that developers could keep on
using these functions just as before, disregarding the fact that they
likely want to use the version taking the op.  As such, this patch
changes the name of the function taking only the callback, such that it
is used solely when the developer really wants to take just the
callback.

[1] at time of this patch, only three calls were being made that would
use only a callback.  Out of over one hundred calls using ops.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mon/PGMonitor.cc
src/mon/PaxosService.cc
src/mon/PaxosService.h