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

Li Wang commented on ZOOKEEPER-4858:
------------------------------------

Will submit the patch.

> 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: Improvement
>          Components: server
>    Affects Versions: 3.9.0, 3.9.1, 3.9.2
>            Reporter: Li Wang
>            Assignee: Li Wang
>            Priority: Major
>
> Remove the synchronized keyword from Zookeeper.takeSnapshot() and  
> ZookeeperServer.restoreFromSnapshot() API, as it can cause lock contention 
> with the sync operation. 
> {code:java}
>  public File takeSnapshot(boolean syncSnap, boolean isSevere, boolean 
> fastForwardFromEdits) throws IOException {
> ....
> }
> {code}
>        
> {code:java}
> public synchronized void sync() {
>      ...
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to