MikeThomsen commented on a change in pull request #4281:
URL: https://github.com/apache/nifi/pull/4281#discussion_r426292858
##########
File path:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/RunMongoAggregation.java
##########
@@ -194,6 +199,8 @@ public void onTrigger(ProcessContext context,
ProcessSession session) throws Pro
if (batch.size() > 0) {
writeBatch(buildBatch(batch), flowFile, context, session,
attrs, REL_RESULTS);
+ } else {
Review comment:
Would be cleaner to do `if (batch.isEmpty()) {} else {}`
##########
File path:
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/RunMongoAggregation.java
##########
@@ -70,6 +70,10 @@
.description("The result set of the aggregation will be sent to
this relationship.")
.name("results")
.build();
+ static final Relationship REL_EMPTY = new Relationship.Builder()
Review comment:
Should autoterminate by default because it's a new one on an existing
processor, and we can't have people's flows suddenly breaking.
----------------------------------------------------------------
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]