Skip to content

Conversation

@Umeshkumar9414
Copy link
Contributor

No description provided.

@Umeshkumar9414 Umeshkumar9414 changed the title @HBASE-29141 Resolution for high default maxQueueLength for call queues HBASE-29141 Resolution for high default maxQueueLength for call queues Nov 28, 2025
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 27s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ master Compile Tests _
+1 💚 mvninstall 3m 27s master passed
+1 💚 compile 3m 22s master passed
+1 💚 checkstyle 0m 59s master passed
+1 💚 spotbugs 1m 36s master passed
+1 💚 spotless 0m 49s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 mvninstall 2m 53s the patch passed
+1 💚 compile 3m 50s the patch passed
+1 💚 javac 3m 50s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 14s the patch passed
+1 💚 spotbugs 2m 7s the patch passed
+1 💚 hadoopcheck 13m 4s Patch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚 spotless 0m 50s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 12s The patch does not generate ASF License warnings.
42m 37s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7490/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7490
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux c04b42d20785 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 86285d4
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 85 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7490/1/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 45s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚 mvninstall 4m 20s master passed
+1 💚 compile 1m 24s master passed
+1 💚 javadoc 0m 37s master passed
+1 💚 shadedjars 8m 49s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 4m 12s the patch passed
+1 💚 compile 1m 16s the patch passed
+1 💚 javac 1m 16s the patch passed
+1 💚 javadoc 0m 42s the patch passed
+1 💚 shadedjars 8m 36s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 218m 45s hbase-server in the patch passed.
253m 49s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7490/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7490
Optional Tests javac javadoc unit compile shadedjars
uname Linux d1ae4d1b2cd7 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 86285d4
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7490/1/testReport/
Max. process+thread count 4493 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7490/1/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Umeshkumar9414
Copy link
Contributor Author

@Apache9 , @apurtell , @virajjasani need help in review.

Copy link
Contributor

@mnpoonia mnpoonia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Umeshkumar9414 This is surely a change in good direction.


public BalancedQueueRpcExecutor(final String name, final int handlerCount,
final int maxQueueLength, final PriorityFunction priority, final Configuration conf,
final String maxQueueLengthConfKey, final PriorityFunction priority, final Configuration conf,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we make the logic change without changing the API signature which is used by HBaseInterfaceAudience.COPROC and PHOENIX?

What if we pass -1 for maxQueueLength, and if it is found to be -1, then determine it using the calculation you have added in this PR?

Copy link
Contributor Author

@Umeshkumar9414 Umeshkumar9414 Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree changing API signature might not work here.

But somehow we have to pass the config value or config key from outside only. As this same constructor is being used for meta priority handler and normal handler.
I think adding an new constructor might be a way forword

currentQueueLimit = (int) queueInitArgs[0];
queueInitArgs[0] = Math.max((int) queueInitArgs[0], DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
queueInitArgs[0] = Math.min((int) queueInitArgs[0], DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
// queue should neven be initialised with 0 or less length
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit typo

Suggested change
// queue should neven be initialised with 0 or less length
// queue should never be initialised with 0 or less length

if (queueInitArgs.length > 0) {
currentQueueLimit = (int) queueInitArgs[0];
queueInitArgs[0] = Math.max((int) queueInitArgs[0], DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
queueInitArgs[0] = Math.min((int) queueInitArgs[0], DEFAULT_CALL_QUEUE_SIZE_HARD_LIMIT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem like a safe change, considering people may be choosing larger queue sizes than 250 today. But this change would enforce no queue size larger than 250.

The pre-existing logic confuses me anyway. It talks about hard limits and soft limits, and suggests that we will initialize queues with hard limits (for initial capacity concerns?) but then enforce soft limits. It was added with HBASE-15306 which talks about dynamic reconfiguration of queues.

But it seems that with RWQueueRpcExecutor, when we call initializeQueues three times, we would be setting the "soft" (current) limit to be this "hard" 250 limit, even if it was greater than the provided/calculated maxQueueLength. Probably the code does not expect the case of calling initializeQueues multiple times.

So perhaps the logic does need to change here, but I don't think we can simply change to Math.min either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Than @d-c-manning it helped me understand hard limit and soft limit in a better way.

PriorityFunction qosFunction = mock(PriorityFunction.class);
RWQueueRpcExecutor executor =
new RWQueueRpcExecutor(testName.getMethodName(), 100, 100, qosFunction, conf, null);
RWQueueRpcExecutor executor = new RWQueueRpcExecutor(testName.getMethodName(), 100,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have a test that validates the queue length limits? Could we validate RpcExecutor#currentQueueLimit directly? Or some other validation that tries to fill the queue, but that may require more work and complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants