zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3019) Add a metric to track number of slow fsyncs
Date Fri, 27 Apr 2018 12:34:00 GMT

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

ASF GitHub Bot commented on ZOOKEEPER-3019:
-------------------------------------------

Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/501#discussion_r184673319
  
    --- Diff: src/java/main/org/apache/zookeeper/server/persistence/FileTxnLog.java ---
    @@ -311,6 +325,9 @@ public synchronized void commit() throws IOException {
     
                     syncElapsedMS = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startSyncNS);
                     if (syncElapsedMS > fsyncWarningThresholdMS) {
    +                    if(serverStats != null) {
    +                        serverStats.incrementFsyncThresholdExceedCount();
    +                    }
    --- End diff --
    
    @nkalmar I wonder if we could add an 'else' branch here with a `LOG.warn()` message indicating
that something had gone wrong and Zk was unable to track fsync warnings. What do you think?


> Add a metric to track number of slow fsyncs
> -------------------------------------------
>
>                 Key: ZOOKEEPER-3019
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3019
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: jmx, server
>    Affects Versions: 3.5.3, 3.4.11, 3.6.0
>            Reporter: Norbert Kalmar
>            Assignee: Norbert Kalmar
>            Priority: Major
>             Fix For: 3.5.4, 3.6.0, 3.4.13
>
>
> Add jmx bean and Command to ZooKeeper server to expose the the number of slow fsyncs
as a metric.
> FileTxnLog.commit() should count the number of times fsync exceeds fsyncWarningThresholdMS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message