You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Marshall McMullen (JIRA)" <ji...@apache.org> on 2014/03/12 22:56:50 UTC

[jira] [Commented] (ZOOKEEPER-1167) C api lacks synchronous version of sync() call.

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

Marshall McMullen commented on ZOOKEEPER-1167:
----------------------------------------------

[~michim] - I'm not sure I agree. Ben's comments specifically state that this is not strictly required for the consistency protocol ZK provides. But if you are communicating through some other mechanism and you want to guarantee those two clients are synchronized, then this would be useful. Granted the application layer can provide it's own wrapper around zoo_async to provide this functionality. So I think the use case is for easier integration into higher level clients. That and consistency since this is the only non-sync API in the C bindings.  I'm still happy to add tests around this and also add a java implementation I just lost sight of this case.

> C api lacks synchronous version of sync() call.
> -----------------------------------------------
>
>                 Key: ZOOKEEPER-1167
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1167
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.3.3, 3.4.3, 3.5.0
>            Reporter: Nicholas Harteau
>            Assignee: Marshall McMullen
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1167.patch
>
>
> Reading through the source, the C API implements zoo_async() which is the zookeeper sync() method implemented in the multithreaded/asynchronous C API.  It doesn't implement anything equivalent in the non-multithreaded API.
> I'm not sure if this was oversight or intentional, but it means that the non-multithreaded API can't guarantee consistent client views on critical reads.
> The zkperl bindings depend on the synchronous, non-multithreaded API so also can't call sync() currently.



--
This message was sent by Atlassian JIRA
(v6.2#6252)