jhuan31 commented on a change in pull request #855: ZOOKEEPER-3310: Add metrics
for prep processor
URL: https://github.com/apache/zookeeper/pull/855#discussion_r266550137
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/PrepRequestProcessor.java
##########
@@ -157,8 +160,8 @@ public void run() {
private ChangeRecord getRecordForPath(String path) throws
KeeperException.NoNodeException {
ChangeRecord lastChange = null;
- synchronized (zks.outstandingChanges) {
- lastChange = zks.outstandingChangesForPath.get(path);
+ synchronized (zks.getOutstandingChanges()) {
Review comment:
I wasn't feeling comfortable doing this either. Even calling the getter
outside is not satisfying because this object is being used in many places. How
about we add the field in PrepRequestProcessor and make it final and initialize
it in the constructor?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services