mirror of https://github.com/apache/nifi.git
NIFI-647: When FORK Event emitted by processor, Framework generates CREATE events for each child in addition to the FORK event; this commit fixes that bug
This commit is contained in:
parent
310ae3ebcd
commit
9fbd88f034
|
@ -519,9 +519,13 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
|||
updateEventContentClaims(builder, flowFile, checkpoint.records.get(flowFile));
|
||||
final ProvenanceEventRecord event = builder.build();
|
||||
|
||||
if (!event.getChildUuids().isEmpty() && !isSpuriousForkEvent(event, checkpoint.removedFlowFiles) && !processorGenerated.contains(event)) {
|
||||
if (!event.getChildUuids().isEmpty() && !isSpuriousForkEvent(event, checkpoint.removedFlowFiles)) {
|
||||
// If framework generated the event, add it to the 'recordsToSubmit' Set.
|
||||
if (!processorGenerated.contains(event)) {
|
||||
recordsToSubmit.add(event);
|
||||
}
|
||||
|
||||
// Register the FORK event for each child and each parent.
|
||||
for (final String childUuid : event.getChildUuids()) {
|
||||
addEventType(eventTypesPerFlowFileId, childUuid, event.getEventType());
|
||||
}
|
||||
|
@ -536,13 +540,12 @@ public final class StandardProcessSession implements ProcessSession, ProvenanceE
|
|||
if (isSpuriousForkEvent(event, checkpoint.removedFlowFiles)) {
|
||||
continue;
|
||||
}
|
||||
if (isSpuriousRouteEvent(event, checkpoint.records)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check if the event indicates that the FlowFile was routed to the same
|
||||
// connection from which it was pulled (and only this connection). If so, discard the event.
|
||||
isSpuriousRouteEvent(event, checkpoint.records);
|
||||
if (isSpuriousRouteEvent(event, checkpoint.records)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
recordsToSubmit.add(event);
|
||||
addEventType(eventTypesPerFlowFileId, event.getFlowFileUuid(), event.getEventType());
|
||||
|
|
Loading…
Reference in New Issue