As far as I can tell from the code:
c1 will send its last seen zxid to the server that it is trying to connect
to. If that zxid is greater than the zxid of the server, the server will
refuse the connection. In this case, if the client has not seen an ack, it
is certainly possible that the last zxid seen will be the same as the zxid
of the server it is connected to, so it will not see the result of w1 yet.

C


On Wed, Dec 4, 2013 at 3:37 PM, kishore g <[email protected]> wrote:

> Hi,
>
> Consider the following case
>
>
>    1. Client c1 sends a write(w1) to zk1
>    2. w1 gets ack from zk2 but not yet from zk3, but quorum is reached
>    3. By the time zk1 sends response back to c1, the connection breaks
>    4. c1 did not get the zxid for the latest transaction
>
> Now c1, depending on whether it connects to zk2 or zk3 might see that w1
> was successful or failure.  Is this analysis correct or will c1
> automatically invoke a sync under the hoods when it gets disconnected and
> connected to another server?
>
> If no, how should one handle this scenario.
> Thanks,
> Kishore G
>

Reply via email to