fgerlits commented on a change in pull request #1013:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1013#discussion_r580932500
##########
File path: libminifi/src/core/Processor.cpp
##########
@@ -277,6 +286,28 @@ void Processor::onTrigger(const
std::shared_ptr<ProcessContext> &context, const
}
}
+void Processor::callOnTrigger(const std::shared_ptr<ProcessContext>& context,
const std::shared_ptr<ProcessSession>& session) {
+ uint64_t num_incoming_flow_files_queued_before =
numIncomingFlowFilesQueued();
+ onTrigger(context, session); // virtual method overridden by subclasses
+ uint64_t num_incoming_flow_files_queued_after = numIncomingFlowFilesQueued();
+
+ if (num_incoming_flow_files_queued_before != 0 &&
num_incoming_flow_files_queued_before == num_incoming_flow_files_queued_after) {
+ logger_->log_info("Processor %s processed no incoming flow files (out of
%" PRIu64 "), so it will yield", name_, num_incoming_flow_files_queued_before);
+ yield();
+ }
+}
+
+void Processor::callOnTrigger(ProcessContext* context, ProcessSession*
session) {
Review comment:
They call different `onTrigger()` overloads. But I will need a
different approach in any case, so this is moot.
----------------------------------------------------------------
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]