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-unsubscr...@hbase.apache.org

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

Reply via email to