If the current pipe has just replaced a newly created "existing pipe",
its out_q would be empty, in which case out_seq cannot be move up to
in_seq of the connecting side and later requests forwarded to leader
wouldn't be acked.
Fixes: http://tracker.ceph.com/issues/23807
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
{
ldout(async_msgr->cct, 10) << __func__ << " " << seq << dendl;
std::lock_guard<std::mutex> l(write_lock);
- if (out_q.count(CEPH_MSG_PRIO_HIGHEST) == 0)
+ if (out_q.count(CEPH_MSG_PRIO_HIGHEST) == 0) {
+ out_seq = seq;
return;
+ }
list<pair<bufferlist, Message*> >& rq = out_q[CEPH_MSG_PRIO_HIGHEST];
while (!rq.empty()) {
pair<bufferlist, Message*> p = rq.front();
void Pipe::discard_requeued_up_to(uint64_t seq)
{
ldout(msgr->cct, 10) << "discard_requeued_up_to " << seq << dendl;
- if (out_q.count(CEPH_MSG_PRIO_HIGHEST) == 0)
+ if (out_q.count(CEPH_MSG_PRIO_HIGHEST) == 0) {
+ out_seq = seq;
return;
+ }
list<Message*>& rq = out_q[CEPH_MSG_PRIO_HIGHEST];
while (!rq.empty()) {
Message *m = rq.front();