szaszm commented on a change in pull request #735: MINIFICPP-1158 - Event
driven processors can starve each other
URL: https://github.com/apache/nifi-minifi-cpp/pull/735#discussion_r382701048
##########
File path: libminifi/include/EventDrivenSchedulingAgent.h
##########
@@ -39,21 +41,28 @@ class EventDrivenSchedulingAgent : public
ThreadedSchedulingAgent {
* Create a new event driven scheduling agent.
*/
EventDrivenSchedulingAgent(std::shared_ptr<core::controller::ControllerServiceProvider>
controller_service_provider, std::shared_ptr<core::Repository> repo,
- std::shared_ptr<core::Repository> flow_repo,
std::shared_ptr<core::ContentRepository> content_repo,
std::shared_ptr<Configure> configuration)
- : ThreadedSchedulingAgent(controller_service_provider, repo, flow_repo,
content_repo, configuration) {
- }
- // Destructor
- virtual ~EventDrivenSchedulingAgent() {
+ std::shared_ptr<core::Repository> flow_repo,
std::shared_ptr<core::ContentRepository> content_repo,
std::shared_ptr<Configure> configuration,
+
std::shared_ptr<utils::ThreadPool<utils::ComplexTaskResult>> thread_pool)
+ : ThreadedSchedulingAgent(controller_service_provider, repo, flow_repo,
content_repo, configuration, thread_pool) {
+ int slice =
configuration->getInt(Configure::nifi_flow_engine_event_driven_time_slice,
DEFAULT_TIME_SLICE_MS);
+ if (slice < 10 || 1000 < slice) {
+ throw Exception(FLOW_EXCEPTION,
std::string(Configure::nifi_flow_engine_event_driven_time_slice) + " is out of
reasonable range!");
Review comment:
Wouldn't a warning be enough? I view as semi-valid use cases if someone
wants really fine-grained round-robin scheduling in high load scenarios (slice
== 0) or to flush an expensive processor before moving on (slice > 1000).
----------------------------------------------------------------
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