Github user ijokarumawak commented on a diff in the pull request:
https://github.com/apache/nifi/pull/497#discussion_r66078443
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java
---
@@ -236,7 +235,8 @@ private void onTrigger(final ProcessContext context,
final ProcessSession sessio
return;
}
- session.commit();
+ // TODO: Comfirm this. Session.commit here is not required since
it has been committed inside receiveFlowFiles/transferFlowFiles.
+ // session.commit();
--- End diff --
HTTP Site-to-Site has to split the transferring process to two HTTP
requests. The first request calls StandardRootGroupPort's onTrigger() as Socket
Site-to-Site does. But HTTP version has to hold the transaction, and the second
HTTP request actually does the session.commit. Whether it calls
`session.commit()` is determined by each transport protocol inside
`receiveFlowFiles` or `transferFlowFiles`.
This `session.commit` doesn't let HTTP version to hold the transaction, and
it was redundant since it has been committed inside
receiveFlowFiles/transferFlowFiles.
I just wanted to confirm that this doesn't break anything. Would you
confirm it @markap14 ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---