zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkalmar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #501: ZOOKEEPER-3019 add metric for slow fsyncs count
Date Tue, 24 Apr 2018 07:44:47 GMT
Github user nkalmar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/501#discussion_r183632850
  
    --- Diff: src/java/test/org/apache/zookeeper/test/FourLetterWordsTest.java ---
    @@ -167,6 +167,8 @@ public void testValidateStatOutput() throws Exception {
             line = in.readLine();
             Assert.assertTrue(Pattern.matches("^Mode: .*$", line));
             line = in.readLine();
    +        Assert.assertTrue(Pattern.matches("^Fsync threshold exceeded: \\d+$", line));
    --- End diff --
    
    Well, it can be achieved, but needs some extra functions in ServerStats:
    -toStringWithoutFsync() 
    -fsyncToString()
    (names are not final :) )
    
    Because StatCommand first calls serverStats.toString(), and in serverStats, new Fsync
command is already at the end. But in the commandRun() in StatCommand, the Node count is appended
after the whole serverStats.toString() call.
    
    Is this OK with you @phunt ?


---

Mime
View raw message