This used to be necessary because the pipe_lock was used when queueing
the pipe in the dispatch queue. Now that is handled by IncomingQueue's
own lock, so these can be removed.
By no longer dropping the lock, we eliminate a whole category of potential
hard-to-debug races. (Not that any were observed, but now we dno't need to
worry about them.)
Signed-off-by: Sage Weil <sage@inktank.com>
ldout(msgr->cct,10) << "connect success " << connect_seq << ", lossy = " << policy.lossy
<< ", features " << connection_state->get_features() << dendl;
- pipe_lock.Unlock();
msgr->dispatch_queue.queue_connect(connection_state);
- pipe_lock.Lock();
if (!reader_running) {
ldout(msgr->cct,20) << "connect starting reader" << dendl;
discard_queue();
- pipe_lock.Unlock();
msgr->dispatch_queue.queue_reset(connection_state);
- pipe_lock.Lock();
}
void Pipe::was_session_reset()
ldout(msgr->cct,10) << "was_session_reset" << dendl;
discard_queue();
- pipe_lock.Unlock();
msgr->dispatch_queue.queue_remote_reset(connection_state);
- pipe_lock.Lock();
out_seq = 0;
in_seq = 0;