fgerlits commented on a change in pull request #1025:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1025#discussion_r592172979



##########
File path: libminifi/include/core/ProcessorConfig.h
##########
@@ -35,10 +35,8 @@ namespace core {
 #define DEFAULT_SCHEDULING_PERIOD_MILLIS 1000
 #define DEFAULT_RUN_DURATION 0
 #define DEFAULT_MAX_CONCURRENT_TASKS 1
-#define DEFAULT_PENALIZATION_PERIOD 1
-// Default yield period in second
 #define DEFAULT_YIELD_PERIOD_SECONDS 1
-#define DEFAULT_PENALIZATION_PERIOD_SECONDS 30
+constexpr std::chrono::seconds DEFAULT_PENALIZATION_PERIOD{30};

Review comment:
       Although this means, at least without #1027, that in case of a faulty 
flow file causing a rollback (and an administrative yield of 30s), we'll have
   * T+0 - rollback, yield for 30s, penalize the flow file 5s
   * T+30s - retry the same faulty flow file, rollback, yield for 30s, penalize 
the flow file 10s
   * T+60s - retry the same faulty flow file, rollback, yield for 30s, penalize 
the flow file 20s
   * T+90s - retry the same faulty flow file, rollback, yield for 30s, penalize 
the flow file 40s
   * T+120s - pick up the next non-penalized flow file from the queue
   
   So the faulty flow file would hold up processing for 2 minutes.  Do you want 
to reduce the administrative yield to 5 seconds, too?  Or we could merge #1027, 
which would solve this problem in another way.




----------------------------------------------------------------
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