diff options
author | Sage Weil <sage@inktank.com> | 2013-02-07 23:13:11 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-08 09:09:20 -0800 |
commit | 4837063d447afb45554f55bb6fde1c97559acd4b (patch) | |
tree | 8ef8b9577a7b44029d86921615da640de96f4105 | |
parent | 17827769f1fe6d7c4838253fcec3b3a4ad288f41 (diff) | |
download | ceph-4837063d447afb45554f55bb6fde1c97559acd4b.tar.gz |
mon: retry PGStats message on EAGAIN
If we get EAGAIN from a paxos restart/election/whatever, we should
restart the message instead of just blindly acking it.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
-rw-r--r-- | src/mon/PGMonitor.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h index 2927c00453a..5db1744111d 100644 --- a/src/mon/PGMonitor.h +++ b/src/mon/PGMonitor.h @@ -71,12 +71,15 @@ private: entity_inst_t who; C_Stats(PGMonitor *p, MPGStats *r, MPGStatsAck *a) : pgmon(p), req(r), ack(a) {} void finish(int r) { - if (r == -ECANCELED) { + if (r >= 0) { + pgmon->_updated_stats(req, ack); + } else if (r == -ECANCELED) { req->put(); ack->put(); - return; + } else { + ack->put(); + dispatch(req); } - pgmon->_updated_stats(req, ack); } }; |