You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/10/11 07:36:23 UTC

[GitHub] [nifi] michael81877 commented on a diff in pull request #6506: NIFI-10243: allow ControlRate to throttle on combination of data rate or flowfile rate

michael81877 commented on code in PR #6506:
URL: https://github.com/apache/nifi/pull/6506#discussion_r991917936


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ControlRate.java:
##########
@@ -211,16 +241,37 @@ public void onPropertyModified(final PropertyDescriptor descriptor, final String
                 || descriptor.equals(GROUPING_ATTRIBUTE_NAME)
                 || descriptor.equals(TIME_PERIOD)) {
             // if the criteria that is being used to determine limits/throttles is changed, we must clear our throttle map.
-            throttleMap.clear();
-        } else if (descriptor.equals(MAX_RATE)) {
+            dataThrottleMap.clear();
+            countThrottleMap.clear();
+        } else if (descriptor.equals(MAX_RATE) || descriptor.equals(MAX_DATA_RATE)) {
+            // MAX_RATE could affect eitehr throttle map; MAX_DATA_RATE only affects data throttle map

Review Comment:
   ```suggestion
               // MAX_RATE could affect either throttle map; MAX_DATA_RATE only affects data throttle map
   ```



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

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