keith-turner commented on code in PR #6146:
URL: https://github.com/apache/accumulo/pull/6146#discussion_r2848384322
##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServer.java:
##########
@@ -477,6 +488,77 @@ public void run() {
}
}
+ // Visible for testing
+ protected boolean isAllowed(TableId tid) {
+ Boolean result = allowedTables.get(tid);
+ if (result == null) {
+ // Clear the cache and try again, maybe there
+ // is a race condition in table creation and
+ // scan
+ updateAllowedTables(true);
+ result = allowedTables.get(tid);
Review Comment:
Thats much better. Thats a tight loop that has the potential to hammer ZK,
but it does not seems like that would happen under any circumstance I can think
of. If wanted to make the code a bit more future proof (like changes in the
code it calls) could use a retry w/ a limit on retries and bit of backoff. Not
sure if thats worthwhile though.
--
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]