ctubbsii commented on code in PR #5421:
URL: https://github.com/apache/accumulo/pull/5421#discussion_r2011159650
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java:
##########
@@ -1088,9 +1091,32 @@ public NamespaceMapping getNamespaces() {
return namespaces;
}
- public HashMap<TableId,ClientTabletCache> tabletCaches() {
+ public ClientTabletCache getTabletLocationCache(TableId tableId) {
ensureOpen();
- return tabletCaches;
+ synchronized (tabletLocationCache) {
Review Comment:
I was wondering about that, because it seemed like we could use any Map the
way I wrote it, and it didn't seem like there was much benefit to using
ConcurrentHashMap. But I looked at the code and it didn't look like it was
doing anything to prevent multiple executions of the function... or at least, I
didn't notice anything the first time I looked. I will revisit this again.
--
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]