fgerlits commented on code in PR #2205:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2205#discussion_r3482207836


##########
libminifi/include/core/Processor.h:
##########
@@ -147,6 +148,7 @@ class Processor : public ConnectableImpl, public 
ConfigurableComponentImpl, publ
   std::atomic<std::chrono::steady_clock::duration> yield_period_;
 
   std::atomic<uint8_t> active_tasks_;
+  std::atomic<bool> trigger_when_empty_;

Review Comment:
   It looks a bit weird that `active_tasks_` is initialized explicitly in the 
constructor and `trigger_when_empty_` isn't. I know it's not strictly 
necessary, but I would prefer to initialize both explicitly.



##########
minifi-api/include/minifi-c/minifi-api.h:
##########


Review Comment:
   Do we really want to keep the name of the parent directory as "minifi-c"?



##########
libminifi/include/RemoteProcessGroupPort.h:
##########
@@ -105,11 +105,6 @@ class RemoteProcessGroupPort : public core::ProcessorImpl {
 
   void setDirection(sitetosite::TransferDirection direction) {
     direction_ = direction;
-    if (direction_ == sitetosite::TransferDirection::RECEIVE) {
-      setTriggerWhenEmpty(true);
-    } else {
-      setTriggerWhenEmpty(false);
-    }
   }

Review Comment:
   We need to make sure that `onSchedule` is called after `setDirection`. Can 
we remove `setDirection` and set the `direction_` in the constructor?



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to