diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2011-11-17 20:45:54 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2011-11-17 20:45:54 -0800 |
commit | 66c628acc8be71a92e801179431e4b938b857b3d (patch) | |
tree | 8b481812b63af929ec2fcda3ebf2a82a67c8757a | |
parent | 6ae0f81e176d617535cae29aebf516eea1eafa43 (diff) | |
download | ceph-66c628acc8be71a92e801179431e4b938b857b3d.tar.gz |
mon: don't propose new state from update_from_paxos
Proposing a new state from within update_from_paxos() confuses some callers,
like PaxosService::_active(). Instead, do it in the on_active() callback.
This also let's us collapse the check_osd_map() caller into on_active(),
and makes it happen on leaders and peons alike, which ought to avoid some
of the pg creation lag we see sometimes (presumably when the osds have
sessions with peons instead of the leader).
Fixes: #1708
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
-rw-r--r-- | src/mon/PGMonitor.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 1a21a291a04..b12d08e65f8 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -95,6 +95,7 @@ void PGMonitor::on_active() if (mon->is_leader()) { check_osd_map(mon->osdmon()->osdmap.epoch); } + send_pg_creates(); } void PGMonitor::tick() @@ -183,8 +184,6 @@ bool PGMonitor::update_from_paxos() paxosv > max) paxos->trim_to(paxosv - max); - send_pg_creates(); - return true; } @@ -566,8 +565,6 @@ void PGMonitor::check_osd_map(epoch_t epoch) if (propose) propose_pending(); - - send_pg_creates(); } void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_pool) |