Re: What really happens when a connection race happens?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Dec 25, 2016 at 2:31 AM, xxhdx1985126 <xxhdx1985126@xxxxxxx> wrote:
> Hi, everyone.
>
> I'm reading the source code of Pipe in ceph, and I'm confused about the code for connection race processing. Suppose that the policy the two Pipe involved is lossless_peer, one of them wins and send the other pipe a CEPH_MSGR_TAG_WAIT message which makes the other Pipe's writer to cond.wait(), and then the winning pipe goes back to waiting for a ceph_msg_connect message to come. But, under this circumstance, the writer of the other pipe is waiting, and as far as I know,  unless something happens it will never send ceph_msg_connect messages, so they will wait for each other for ever........  There must be some misunderstanding here, but I don't know where, please help me. Thank you:-)

The point is that we have racing connect attempts here — the "winner"
has already sent out a connection attempt which the loser will respond
to. So neither of them needs to do anything; when the loser processes
the winner's connection attempt, it will shut down its losing Pipe,
start up a Pipe with the incoming attempt, and send back an
acknowledgement to the winner.
-Greg
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux