You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Kezhu Wang (Jira)" <ji...@apache.org> on 2024/09/21 09:01:00 UTC
[jira] [Updated] (ZOOKEEPER-4747) Java api lacks synchronous version of sync() call
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kezhu Wang updated ZOOKEEPER-4747:
----------------------------------
Fix Version/s: 3.9.3
> Java api lacks synchronous version of sync() call
> -------------------------------------------------
>
> Key: ZOOKEEPER-4747
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4747
> Project: ZooKeeper
> Issue Type: New Feature
> Components: java client
> Reporter: Kezhu Wang
> Assignee: Kezhu Wang
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.10.0, 3.9.3
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Ideally, it should be redundant just as what [~breed] says in ZOOKEEPER-1167.
> {quote}
> it wasn't an oversight. there is no reason for a synchronous version. because of the ordering guarantees, if you issue an asynchronous sync, the next call, whether synchronous or asynchronous will see the updated state.
> {quote}
> But in case of connection loss and absent of ZOOKEEPER-22, client has to check result of asynchronous sync before next call. So, currently, we can't simply issue an fire-and-forget asynchronous sync and an read to gain strong consistent. Then in a synchronous call chain, client has to convert asynchronous {{sync}} to synchronous to gain strong consistent. This is what I do in [EagerACLFilterTest::syncClient|https://github.com/apache/zookeeper/blob/f42c01de73867ffbc12707b3e9f9cd7f847fe462/zookeeper-server/src/test/java/org/apache/zookeeper/server/quorum/EagerACLFilterTest.java#L98], it is apparently unfriendly to end users.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)