NIFI-2717: Ensure that when performing site-to-site communications that we 
always commit the transaction on the remote side before committing it on the 
local side


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/5d81cabd
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/5d81cabd
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/5d81cabd

Branch: refs/heads/support/nifi-1.0.x
Commit: 5d81cabdc7817dbf6f9901ffa6a1981ce3e57123
Parents: e80a670
Author: Mark Payne <marka...@hotmail.com>
Authored: Wed Aug 31 15:02:30 2016 -0400
Committer: jpercivall <jperciv...@apache.org>
Committed: Thu Dec 15 12:06:32 2016 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/5d81cabd/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
index 1996357..e8b542e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRemoteGroupPort.java
@@ -305,8 +305,8 @@ public class StandardRemoteGroupPort extends 
RemoteGroupPort {
             final long uploadMillis = 
stopWatch.getDuration(TimeUnit.MILLISECONDS);
             final String dataSize = FormatUtils.formatDataSize(bytesSent);
 
-            session.commit();
             transaction.complete();
+            session.commit();
 
             final String flowFileDescription = (flowFilesSent.size() < 20) ? 
flowFilesSent.toString() : flowFilesSent.size() + " FlowFiles";
             logger.info("{} Successfully sent {} ({}) to {} in {} milliseconds 
at a rate of {}", new Object[]{

Reply via email to