You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Apache9 (via GitHub)" <gi...@apache.org> on 2023/07/03 13:46:59 UTC

[GitHub] [hbase] Apache9 commented on a diff in pull request #5267: HBASE-27905 Directly schedule procedures that do not need to acquire …

Apache9 commented on code in PR #5267:
URL: https://github.com/apache/hbase/pull/5267#discussion_r1250920232


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java:
##########
@@ -368,6 +374,13 @@ private static <T extends Comparable<T>> void addToRunQueue(FairQueue<T> fairq,
 
   private static <T extends Comparable<T>> void removeFromRunQueue(FairQueue<T> fairq,
     Queue<T> queue, Supplier<String> reason) {
+    if (hasNoLockNeededProcedure(queue)) {

Review Comment:
   Ideally, if there are still no lock procedure in the queue, we should not arrive here?



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/MasterProcedureScheduler.java:
##########
@@ -219,6 +222,9 @@ private <T extends Comparable<T>> Procedure<?> doPoll(final FairQueue<T> fairq)
     // procedures, then we give up and remove the queue from run queue.
     for (int i = 0, n = rq.size(); i < n; i++) {
       Procedure<?> proc = rq.poll();
+      if (!proc.needLock()) {

Review Comment:
   Why not add this logic in the below isLockReady method?



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org