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.


---

Reply via email to