mnpoonia commented on code in PR #7613:
URL: https://github.com/apache/hbase/pull/7613#discussion_r2679835142


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java:
##########
@@ -2507,16 +2504,19 @@ boolean isCacheInitialized(String api) {
 
   @Override
   public boolean waitForCacheInitialization(long timeout) {
-    try {
-      while (cacheState == CacheState.INITIALIZING) {
-        if (timeout <= 0) {
-          break;
-        }
+    while (cacheState == CacheState.INITIALIZING) {
+      if (timeout <= 0) {
+        break;
+      }
+      try {
         Thread.sleep(100);
-        timeout -= 100;
+      } catch (InterruptedException e) {
+        LOG.warn("Interrupted while waint for cache initialization", e);

Review Comment:
   ```suggestion
           LOG.warn("Interrupted while waiting for cache initialization", e);
   ```



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