Explorar o código

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 %!s(int64=5) %!d(string=hai) anos
pai
achega
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) {
             if (this.nextProcessor instanceof Flushable) {
                 ((Flushable) this.nextProcessor).flush();
                 ((Flushable) this.nextProcessor).flush();
             }
             }
-            lastFlushTime = Time.currentElapsedTime();
         }
         }
+        lastFlushTime = Time.currentElapsedTime();
     }
     }
 
 
     public void shutdown() {
     public void shutdown() {