apovzner commented on a change in pull request #8977:
URL: https://github.com/apache/kafka/pull/8977#discussion_r451871529



##########
File path: clients/src/main/java/org/apache/kafka/common/metrics/Sensor.java
##########
@@ -97,7 +97,25 @@ public static RecordingLevel forName(String name) {
         public boolean shouldRecord(final int configId) {
             return configId == DEBUG.id || configId == this.id;
         }
+    }
 
+    public enum QuotaEnforcementType {
+        /**
+         * The quota is not enforced.
+         */
+        NONE,
+
+        /**
+         * The quota is enforced before updating the sensor. An update
+         * is rejected if the quota is already exhausted.

Review comment:
       nit: somehow the first sentence is confusing because it seem to imply 
that the sensor gets updated in this case as well. Do you think maybe this 
sounds a bit clearer? "The check for quota violation is done prior to recording 
the value. If the quota is already exhausted, the value is not recorded into 
the sensor." Or perhaps some other  Up to you. 
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to