You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "rmdmattingly (via GitHub)" <gi...@apache.org> on 2025/04/30 19:13:47 UTC

[PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

rmdmattingly opened a new pull request, #6953:
URL: https://github.com/apache/hbase/pull/6953

   While rolling out atomic throttles at my day job, I realized that we're unable to fetch our atomic throttle settings. This is because, in https://issues.apache.org/jira/browse/HBASE-29229, I forgot to wire up atomic throttles in the QuotaSettingsFactory.
   
   I've also added a test that will make it much harder to make this same mistake down the road


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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6953:
URL: https://github.com/apache/hbase/pull/6953#discussion_r2069300848


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java:
##########
@@ -168,6 +168,18 @@ protected static List<ThrottleSettings> fromThrottle(final String userName,
       settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
         ThrottleType.WRITE_CAPACITY_UNIT, throttle.getWriteCapacityUnit()));
     }
+    if (throttle.hasAtomicReadSize()) {
+      settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
+        ThrottleType.ATOMIC_READ_SIZE, throttle.getAtomicReadSize()));
+    }
+    if (throttle.hasAtomicWriteSize()) {
+      settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
+        ThrottleType.ATOMIC_WRITE_SIZE, throttle.getAtomicWriteSize()));
+    }

Review Comment:
   [nitpick] Consider adding an inline comment here (and similarly for atomic write and request numbers) to explain the purpose of handling these atomic throttle settings for improved maintainability.
   ```suggestion
       }
       // Handle atomic read size throttling: This enforces limits on the size of read operations
       // at an atomic level, ensuring precise control over resource usage.
       if (throttle.hasAtomicReadSize()) {
         settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
           ThrottleType.ATOMIC_READ_SIZE, throttle.getAtomicReadSize()));
       }
       // Handle atomic write size throttling: This enforces limits on the size of write operations
       // at an atomic level, ensuring precise control over resource usage.
       if (throttle.hasAtomicWriteSize()) {
         settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
           ThrottleType.ATOMIC_WRITE_SIZE, throttle.getAtomicWriteSize()));
       }
       // Handle atomic request number throttling: This enforces limits on the number of requests
       // at an atomic level, ensuring precise control over resource usage.
   ```



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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6953:
URL: https://github.com/apache/hbase/pull/6953#issuecomment-2843230161

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 35s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  |  Patch does not have any anti-patterns.  |
   |||| _ master Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 18s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   6m 37s |  |  master passed  |
   | +1 :green_heart: |  compile  |   7m 15s |  |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m 56s |  |  master passed  |
   | +1 :green_heart: |  spotbugs  |   4m 52s |  |  master passed  |
   | +1 :green_heart: |  spotless  |   1m 35s |  |  branch has no errors when running spotless:check.  |
   |||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 22s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   6m 29s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   6m 53s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   6m 53s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  1s |  |  The patch has no blanks issues.  |
   | +1 :green_heart: |  checkstyle  |   1m 56s |  |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   5m 23s |  |  the patch passed  |
   | +1 :green_heart: |  hadoopcheck  |  20m 36s |  |  Patch does not cause any errors with Hadoop 3.3.6 3.4.0.  |
   | +1 :green_heart: |  spotless  |   1m 40s |  |  patch has no errors when running spotless:check.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 50s |  |  The patch does not generate ASF License warnings.  |
   |  |   |  80m 20s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6953/1/artifact/yetus-general-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6953 |
   | Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
   | uname | Linux 98c72d26f586 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 / ec1aa842373599c543ea5d5cb499571cfdb6cb82 |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   | Max. process+thread count | 84 (vs. ulimit of 30000) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6953/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.
   
   


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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "rmdmattingly (via GitHub)" <gi...@apache.org>.
rmdmattingly merged PR #6953:
URL: https://github.com/apache/hbase/pull/6953


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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "rmdmattingly (via GitHub)" <gi...@apache.org>.
rmdmattingly commented on code in PR #6953:
URL: https://github.com/apache/hbase/pull/6953#discussion_r2069302437


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaSettingsFactory.java:
##########
@@ -168,6 +168,18 @@ protected static List<ThrottleSettings> fromThrottle(final String userName,
       settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
         ThrottleType.WRITE_CAPACITY_UNIT, throttle.getWriteCapacityUnit()));
     }
+    if (throttle.hasAtomicReadSize()) {
+      settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
+        ThrottleType.ATOMIC_READ_SIZE, throttle.getAtomicReadSize()));
+    }
+    if (throttle.hasAtomicWriteSize()) {
+      settings.add(ThrottleSettings.fromTimedQuota(userName, tableName, namespace, regionServer,
+        ThrottleType.ATOMIC_WRITE_SIZE, throttle.getAtomicWriteSize()));
+    }

Review Comment:
   I'm against superfluous comments that just reiterate straightforward code. This is already too verbose



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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "rmdmattingly (via GitHub)" <gi...@apache.org>.
rmdmattingly commented on code in PR #6953:
URL: https://github.com/apache/hbase/pull/6953#discussion_r2069300667


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaThrottle.java:
##########
@@ -652,4 +655,39 @@ public void testExceedThrottleQuota() throws Exception {
     admin.setQuota(QuotaSettingsFactory.unthrottleTable(TABLE_NAMES[0]));
     triggerTableCacheRefresh(TEST_UTIL, true, TABLE_NAMES[0]);
   }
+
+  @Test
+  public void testSetAndGetAllThrottleTypes() throws Exception {
+    for (ThrottleType throttleType : ThrottleType.values()) {
+      canSetAndGetUserThrottle(throttleType);
+    }

Review Comment:
   By validating this for every throttle type, we'll prevent new throttle types from missing this key usability piece down the road



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


Re: [PR] HBASE-29281 Atomic request throttles are missing QuotaSettingsFactory support [hbase]

Posted by "Apache-HBase (via GitHub)" <gi...@apache.org>.
Apache-HBase commented on PR #6953:
URL: https://github.com/apache/hbase/pull/6953#issuecomment-2843740014

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   0m 52s |  |  Docker mode activated.  |
   | -0 :warning: |  yetus  |   0m  2s |  |  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 _ |
   | +0 :ok: |  mvndep  |   0m 13s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  mvninstall  |   4m 43s |  |  master passed  |
   | +1 :green_heart: |  compile  |   2m  2s |  |  master passed  |
   | +1 :green_heart: |  javadoc  |   1m  8s |  |  master passed  |
   | +1 :green_heart: |  shadedjars  |   7m 58s |  |  branch has no errors when building our shaded downstream artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 13s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  mvninstall  |   4m 22s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   1m 45s |  |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m 45s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m  2s |  |  the patch passed  |
   | +1 :green_heart: |  shadedjars  |   7m 58s |  |  patch has no errors when building our shaded downstream artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   2m  1s |  |  hbase-client in the patch passed.  |
   | +1 :green_heart: |  unit  | 221m 53s |  |  hbase-server in the patch passed.  |
   |  |   | 260m 53s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6953/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
   | GITHUB PR | https://github.com/apache/hbase/pull/6953 |
   | Optional Tests | javac javadoc unit compile shadedjars |
   | uname | Linux 1ee895875e17 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 / ec1aa842373599c543ea5d5cb499571cfdb6cb82 |
   | Default Java | Eclipse Adoptium-17.0.11+9 |
   |  Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6953/1/testReport/ |
   | Max. process+thread count | 5960 (vs. ulimit of 30000) |
   | modules | C: hbase-client hbase-server U: . |
   | Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6953/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.
   
   


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