zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdunning <...@git.apache.org>
Subject [GitHub] zookeeper pull request #307: ZOOKEEPER-2770 ZooKeeper slow operation log
Date Thu, 26 Oct 2017 03:55:59 GMT
Github user tdunning commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/307#discussion_r147040873
  
    --- Diff: src/java/main/org/apache/zookeeper/server/FinalRequestProcessor.java ---
    @@ -81,9 +81,11 @@
         private static final Logger LOG = LoggerFactory.getLogger(FinalRequestProcessor.class);
     
         ZooKeeperServer zks;
    +    ServerStats serverStats;
    --- End diff --
    
    I think that caching this reference is a bad practice. Getting a reference every time
costs essentially nothing and keeping a reference to a data structure that we don't own is
asking for trouble if anybody every reallocates it.


---

Mime
View raw message