...not just at the end of _dispatch. Often we reply
to clients (i.e. complete a request) outside of
_dispatch, and currently in these cases we fail
to check for clientreplay completion (only hitting
that next time someone talks to _dispatch)
Fixes: #14357
Signed-off-by: John Spray <john.spray@redhat.com>
queue_one_replay();
}
+bool MDSRank::queue_one_replay()
+{
+ if (replay_queue.empty()) {
+ if (mdcache->get_num_client_requests() == 0) {
+ clientreplay_done();
+ }
+ return false;
+ }
+ queue_waiter(replay_queue.front());
+ replay_queue.pop_front();
+ return true;
+}
+
void MDSRank::clientreplay_done()
{
dout(1) << "clientreplay_done" << dendl;
replay_queue.push_back(c);
}
- bool queue_one_replay() {
- if (replay_queue.empty())
- return false;
- queue_waiter(replay_queue.front());
- replay_queue.pop_front();
- return true;
- }
+ bool queue_one_replay();
void set_osd_epoch_barrier(epoch_t e);
epoch_t get_osd_epoch_barrier() const {return osd_epoch_barrier;}
client_con->send_message(reply);
}
- if (mdr->has_completed && mds->is_clientreplay())
- mds->queue_one_replay();
+ const bool completed = mdr->has_completed;
// clean up request
mdcache->request_finish(mdr);
tracedn->get_projected_linkage()->is_remote()) {
mdcache->eval_remote(tracedn);
}
+
+ // Advance clientreplay process if we're in it
+ if (completed && mds->is_clientreplay()) {
+ mds->queue_one_replay();
+ }
}