[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14732468#comment-14732468
 ] 

Raul Gutierrez Segales commented on ZOOKEEPER-2253:
---------------------------------------------------

Thanks for the patch [~cchen]! Though, it's not applying:

{code}
     [exec] patching file src/c/src/zookeeper.c
     [exec] Hunk #1 succeeded at 1617 (offset 105 lines).
     [exec] Hunk #2 FAILED at 1877.
     [exec] Hunk #3 succeeded at 2740 (offset 259 lines).
     [exec] Hunk #4 succeeded at 2852 (offset 259 lines).
     [exec] Hunk #5 FAILED at 2664.
     [exec] 2 out of 5 hunks FAILED -- saving rejects to file 
src/c/src/zookeeper.c.rej
     [exec] patching file src/c/tests/TestOperations.cc
     [exec] PATCH APPLICATION FAILED
{code}

Do you have a fresh checkout?

> C asserts ordering of ping requests, while Java client does not
> ---------------------------------------------------------------
>
>                 Key: ZOOKEEPER-2253
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2253
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.0
>            Reporter: Chris Chen
>         Attachments: ZOOKEEPER-2253.patch
>
>
> Affects C clients from 3.3 to trunk.
> The Java client does not enforce ordering on ping requests. It merely updates 
> fields when a ping reply is received and schedules a new ping request when 
> necessary.
> The C client actually enqueues the void response in the completion data 
> structure and pulls it off when it gets a response.
> This sounds like an implementation detail (and it is, sort of), but if a 
> future server were to, say, send unsolicited ping replies to a client to 
> assert liveness, it would work fine against a Java client but would cause a C 
> client to fail the assertion in zookeeper_process, "assert(cptr)", line 2912, 
> zookeeper.c.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to