]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: accumulate a single pending transaction and propose it all at once
authorSage Weil <sage@redhat.com>
Tue, 13 Jan 2015 22:51:04 +0000 (14:51 -0800)
committerSage Weil <sage@redhat.com>
Tue, 13 Jan 2015 22:51:04 +0000 (14:51 -0800)
commit67a90dd75c9ea40a6263724c574f7e558fa8327c
treefe0406fdcf602e1a81c5abf6ddd3d30d2663b2bd
parent5461368968a97087d053b53de5cc15ed15b9245e
mon: accumulate a single pending transaction and propose it all at once

Previous we would queue lots of distinct encoded Transactions from various
callers, usually one per PaxosService.  These would be sent through paxos
one at a time.

If there is a completed transaction there is no reason to delay; it is
more efficient to push it through immediately.  Since we will propose
anything pending right when we finish, there is minimal opportunity for
other work to get done.

Instead, accumulate everything in a single MonitorDBStore::Transaction and
propose all pending changes all at once.  Encode at propose time and
expose the Transaction to the callers so they can add their changes.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/ConfigKeyService.cc
src/mon/Monitor.cc
src/mon/Paxos.cc
src/mon/Paxos.h
src/mon/PaxosService.cc