Browse Source

ZOOKEEPER-3656: Properly set lastFlushTime when flushing

Author: hammerle <hammerle@fb.com>

Reviewers: hanm@apache.org, fangmin@apache.org

Closes #1189 from hammerlefb/syncrequestfix
hammerle 5 years ago
parent
commit
7408ff4377

+ 1 - 1
zookeeper-server/src/main/java/org/apache/zookeeper/server/SyncRequestProcessor.java

@@ -248,8 +248,8 @@ public class SyncRequestProcessor extends ZooKeeperCriticalThread implements Req
             if (this.nextProcessor instanceof Flushable) {
                 ((Flushable) this.nextProcessor).flush();
             }
-            lastFlushTime = Time.currentElapsedTime();
         }
+        lastFlushTime = Time.currentElapsedTime();
     }
 
     public void shutdown() {