[
https://issues.apache.org/jira/browse/ZOOKEEPER-3019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16435806#comment-16435806
]
ASF GitHub Bot commented on ZOOKEEPER-3019:
-------------------------------------------
Github user edwardoliveira commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/501#discussion_r181129644
--- Diff: src/java/main/org/apache/zookeeper/server/ServerStats.java ---
@@ -148,9 +150,23 @@ synchronized public void resetRequestCounters(){
packetsReceived = 0;
packetsSent = 0;
}
+
+ public long getFsyncThresholdExceedCount() {
+ return fsyncThresholdExceedCount;
+ }
+
+ synchronized public void increaseFsyncThresholdExceedCount() {
+ fsyncThresholdExceedCount++;
+ }
+
+ synchronized void resetFsyncThresholdExceedCount() {
--- End diff --
It would be nice to expose this method via JMX too, imho.
> 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
> Reporter: Norbert Kalmar
> Assignee: Norbert Kalmar
> Priority: Major
>
> 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)