]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msgr: discard the local_pipe's queue on shutdown.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 29 Feb 2012 01:30:23 +0000 (17:30 -0800)
committerSage Weil <sage@newdream.net>
Wed, 29 Feb 2012 17:12:46 +0000 (09:12 -0800)
commit2437ce02c13bc1c6bdd1ba79bdd6d5bf227ec397
treef225dfbd51114e1e97cc5f806a50af82585e8a1a
parent7690f0b9596f8f2a9b8f09e1f6e57970e8d0445e
msgr: discard the local_pipe's queue on shutdown.

To facilitate this, we do two things:
1) actually identify the number of special code values we pass around
2) use that to prevent trying to put() those non-pointer values in
Pipe::discard_queue().
Then we just call local_pipe.discard_queue() in wait() like happens
(indirectly, via reaping) with all the normal Pipes in rank_pipe.

But this does make me think that we may be approaching the point
where it's appropriate to create a subclass LocalPipe (against a
RemotePipe like our current Pipe implementation is mostly intended
to be).

Should fix #2086.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Reviewed-by: Sage Weil <sage@newdream.net>
src/msg/SimpleMessenger.cc
src/msg/SimpleMessenger.h