rmdmattingly commented on code in PR #8617:
URL: https://github.com/apache/hbase/pull/8617#discussion_r4025623572


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaCache.java:
##########
@@ -118,12 +139,31 @@ public boolean isStopped() {
   }
 
   private void ensureInitialized() {
-    if (!initialized) {
-      synchronized (initializerLock) {
-        if (!initialized) {
-          refreshChore.chore();
-          initialized = true;
-        }
+    if (initialized) {
+      return;
+    }
+    synchronized (initializerLock) {
+      if (initialized) {
+        return;
+      }
+      if (initialLoad == null) {
+        initialLoad = initialLoadExecutor.submit(() -> refreshChore.chore());
+      }
+      try {
+        initialLoad.get(initialLoadTimeoutMs, TimeUnit.MILLISECONDS);

Review Comment:
   Correct, I think we should just avoid throttling on the namespace table 
entirely. Meanwhile I still think it makes sense to remove the possibility of a 
deadlock in this codepath entirely to help future proof it from similar mistakes



-- 
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]

Reply via email to