adam-markovics commented on a change in pull request #1191:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1191#discussion_r722004477
##########
File path: libminifi/src/core/Processor.cpp
##########
@@ -385,17 +385,20 @@ void Processor::validateAnnotations() const {
if (!hasIncomingConnections()) {
throw Exception(PROCESS_SCHEDULE_EXCEPTION, "INPUT_REQUIRED was
specified for the processor, but no incoming connections were found");
}
- return;
+ break;
}
case annotation::Input::INPUT_ALLOWED:
- return;
+ break;
case annotation::Input::INPUT_FORBIDDEN: {
if (hasIncomingConnections()) {
throw Exception(PROCESS_SCHEDULE_EXCEPTION, "INPUT_FORBIDDEN was
specified for the processor, but there are incoming connections");
}
- return;
}
}
+
+ if (isSingleThreaded() && max_concurrent_tasks_ > 1) {
+ throw Exception(PROCESS_SCHEDULE_EXCEPTION, "Processor can not be run in
parallel, its \"max concurrent tasks\" value is too high. It must be set to
1.");
+ }
Review comment:
If there were two functions, then here the new one would have to be
called as well:
```
void ProcessGroup::verify() const {
for (const auto& processor : processors_) {
processor->validateAnnotations();
processor->validateThreads(); // like this
}
}
```
Do you agree with that?
--
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]