ijokarumawak commented on a change in pull request #3616: NIFI-6501: Add config
to limit buffer queue size in CaptureChangeMySQL
URL: https://github.com/apache/nifi/pull/3616#discussion_r309543900
##########
File path:
nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java
##########
@@ -178,6 +179,28 @@
.expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
.build();
+ public static final PropertyDescriptor MAX_QUEUE_SIZE = new
PropertyDescriptor.Builder()
+ .name("capture-change-mysql-max-queue-size")
+ .displayName("Max Queue Size")
+ .description("The maximum size of the buffer queue. This queue is used
as an intermediate storage until the scheduled thread polls to consume from
it.")
+ .defaultValue("100000")
+ .required(false)
+ .addValidator(StandardValidators.NON_NEGATIVE_INTEGER_VALIDATOR)
+ .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
+ .build();
+
+ public static final PropertyDescriptor MAX_QUEUE_OFFER_TIMEOUT = new
PropertyDescriptor.Builder()
+ .name("capture-change-mysql-max-queue-offer-timeout")
+ .displayName("Max Queue Offer Time")
+ .description("The maximum amount of time allowed for polling thread to
consume events from queue. Max time which binlog reading (offering) thread "
Review comment:
> The maximum amount of time allowed for polling thread to consume events
from queue.
Is this description correct? The consuming thread uses `queue.poll()` and
the method doesn't block. It returns null when the queue is empty. The max time
is only used by the offering thread. It limits the allowed amount of time for
polling thread to consume events indirectly though.. Writing about internal
specifics may be difficult for users to understand. How about:
> The maximum amount of time allowed to wait for the intermediate queue
space to be available, before received bin log events are discarded.
----------------------------------------------------------------
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]
With regards,
Apache Git Services