virajjasani commented on a change in pull request #3397:
URL: https://github.com/apache/hbase/pull/3397#discussion_r655538100



##########
File path: 
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/util/DelayedUtil.java
##########
@@ -79,7 +84,13 @@ public String toString() {
    */
   public static <E extends Delayed> E takeWithoutInterrupt(final DelayQueue<E> 
queue) {
     try {
-      return queue.take();
+      E element = queue.poll(10, TimeUnit.SECONDS);
+      if (element == null && queue.size() > 0) {
+        LOG.error("DelayQueue is not empty when timed waiting elapsed. If this 
is repeated for"

Review comment:
       Also, this condition might be true in some case, but only if this 
condition continues to be `true` for the same queue consistently, we might have 
a problem. That's why I am keeping log message like this:
   ```
   DelayQueue is not empty when timed waiting elapsed. If this is repeated for 
same queue consistently, it means no element is getting expired from DelayQueue 
and it might freeze the system.
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to