cshannon commented on code in PR #5338:
URL: https://github.com/apache/accumulo/pull/5338#discussion_r1956811205
##########
core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java:
##########
@@ -484,13 +484,18 @@ protected void copyStats(ZcStat userStat, ZcStat
cachedStat) {
* Clears this cache.
*/
protected void clear() {
- Preconditions.checkState(!closed);
+ if (closed) {
+ return;
+ }
nodeCache.clear();
updateCount.incrementAndGet();
log.trace("{} cleared all from cache", cacheId);
}
public void close() {
+ if (closed) {
Review Comment:
Oops nevermind, I missed the comment where the AtomicBoolean was switched to
a volatile on purpose so ignore.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]