You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:12:34 UTC

[GitHub] [hbase] virajjasani commented on a change in pull request #3397: HBASE-26012 Improve logging and dequeue logic in DelayQueue

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



##########
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:
       Since the default value of `hbase.procedure.remote.dispatcher.delay.msec` is just 150, I thought 10s might be enough. But I am open to keep it higher. What do you think would be better value?

##########
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:
       Since the default value of `hbase.procedure.remote.dispatcher.delay.msec` is just 150, I thought 10s might be enough. But I am open to keep it higher. What do you think would be better value? Maybe 25/30s or 60s?

##########
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:
       Since the default value of `hbase.procedure.remote.dispatcher.delay.msec` is just 150, I thought 10s might be enough. But I am open to keeping it higher. What do you think would be better value? Maybe 25/30s or 60s?




-- 
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:
users@infra.apache.org