Skip to content

Commit

Permalink
ZOOKEEPER-4858: Remove the lock contention between snapshotting and t…
Browse files Browse the repository at this point in the history
…he sync operation

Author: Li Wang <[email protected]>
  • Loading branch information
liwang committed Sep 7, 2024
1 parent 2c2b74c commit ccdf4e5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ public File takeSnapshot(boolean syncSnap) throws IOException {
* @return file snapshot file object
* @throws IOException
*/
public synchronized File takeSnapshot(boolean syncSnap, boolean isSevere, boolean fastForwardFromEdits) throws IOException {
public File takeSnapshot(boolean syncSnap, boolean isSevere, boolean fastForwardFromEdits) throws IOException {
long start = Time.currentElapsedTime();
File snapFile = null;
try {
Expand Down Expand Up @@ -598,7 +598,7 @@ public synchronized File takeSnapshot(boolean syncSnap, boolean isSevere, boolea
* @Return last processed zxid
* @throws IOException
*/
public synchronized long restoreFromSnapshot(final InputStream inputStream) throws IOException {
public long restoreFromSnapshot(final InputStream inputStream) throws IOException {
if (inputStream == null) {
throw new IllegalArgumentException("InputStream can not be null when restoring from snapshot");
}
Expand Down

0 comments on commit ccdf4e5

Please sign in to comment.