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>
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);
}
};