[GitHub] eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs
eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs URL: https://github.com/apache/zookeeper/pull/742#discussion_r244996468 ## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/FileTxnLog.java ## @@ -180,7 +180,7 @@ public static void setPreallocSize(long size) { * @param serverStats used to update fsyncThresholdExceedCount */ @Override -public void setServerStats(ServerStats serverStats) { +public synchronized void setServerStats(ServerStats serverStats) { Review comment: This is spotbugs error: `[ERROR] Inconsistent synchronization of org.apache.zookeeper.server.persistence.FileTxnLog.serverStats; locked 66% of time [org.apache.zookeeper.server.persistence.FileTxnLog, org.apache.zookeeper.server.persistence.FileTxnLog, org.apache.zookeeper.server.persistence.FileTxnLog] Unsynchronized access at FileTxnLog.java:[line 184]Synchronized access at FileTxnLog.java:[line 381]Synchronized access at FileTxnLog.java:[line 382] IS2_INCONSISTENT_SYNC ` I think this change is safe This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs
eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs URL: https://github.com/apache/zookeeper/pull/742#discussion_r244995163 ## File path: zookeeper-server/src/main/java/org/apache/zookeeper/ClientCnxn.java ## @@ -18,6 +18,7 @@ package org.apache.zookeeper; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; Review comment: @anmolnar personally I like to use annotation because when you read the java file you see the problems. And I am usually using the configuration file for coarse grained control, like when there is some kind of check you don't want to consider at all or in many files This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs
eolivelli commented on a change in pull request #742: ZOOKEEPER-3223: Configure Spotbugs URL: https://github.com/apache/zookeeper/pull/742#discussion_r244994756 ## File path: excludeFindBugsFilter.xml ## @@ -0,0 +1,14 @@ + + + Review comment: @anmolnar this name is very common, as many project migrated from findbugs. I can change, no problem. But I don't feel strong about it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services