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/12/21 04:17:00 UTC
[jira] [Updated] (ZOOKEEPER-4858) Remove the lock contention between snapshotting and the sync operation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-4858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kezhu Wang updated ZOOKEEPER-4858:
----------------------------------
Affects Version/s: 3.9.3
> Remove the lock contention between snapshotting and the sync operation
> ----------------------------------------------------------------------
>
> Key: ZOOKEEPER-4858
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4858
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.9.0, 3.9.1, 3.9.2, 3.9.3
> Reporter: Li Wang
> Assignee: Li Wang
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.10.0, 3.9.4
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> Remove the synchronized keyword from Zookeeper.takeSnapshot() and ZookeeperServer.restoreFromSnapshot() API, as it causes lock contention on the ZookeeperServer object with the sync operation.
> In ZookeeperServer.java, we have the following
> {code:java}
> public synchronized File takeSnapshot(boolean syncSnap, boolean isSevere, boolean fastForwardFromEdits) throws IOException {
> ....
> }
> {code}
> In ObserverZookeeperServer.java and FollowerZookeeperServer.java, we have the following
>
> {code:java}
> public synchronized void sync() {
> ...
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)