pivotal-jbarrett commented on code in PR #7740: URL: https://github.com/apache/geode/pull/7740#discussion_r887249683
########## geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java: ########## @@ -862,8 +862,9 @@ public void recoverPrimary(Set<ServerLocation> excludedServers) { return; } final boolean isDebugEnabled = logger.isDebugEnabled(); - if (queueConnections != null && queueConnections.getPrimary() != null - && !queueConnections.getPrimary().isDestroyed()) { + ConnectionList snapshot = queueConnections; Review Comment: I really don't like the name snapshot. It isn't a snapshot since the contents of the queue can change. It is the current reference to the queue. For volatiles I prefer either a local prefix, like `localQueueConnctions`, or just shadowing the member like: ```java final ConnectionList queueConnections = this.queueConnections; ``` It can be made slightly more clear the intent with a little refactor. ```java final ConnectionList queueConnections = getQueueConnections(); ``` -- 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. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org