You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2017/09/12 19:31:46 UTC

nifi git commit: NIFI-4376: Remove expired S2S request from internal queue. This closes #2144.

Repository: nifi
Updated Branches:
  refs/heads/master d698f227d -> 7423b41e3


NIFI-4376: Remove expired S2S request from internal queue. This closes #2144.

Before this fix, expired requests stay in the queue and blocks newly
received requests to be offerred.


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

Branch: refs/heads/master
Commit: 7423b41e3cfbace8a01ca9734521ae49117dbba8
Parents: d698f22
Author: Koji Kawamura <ij...@apache.org>
Authored: Mon Sep 11 18:45:11 2017 +0900
Committer: Mark Payne <ma...@hotmail.com>
Committed: Tue Sep 12 15:31:10 2017 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/nifi/remote/StandardRootGroupPort.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/7423b41e/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java
index ea79675..ee16406 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-site-to-site/src/main/java/org/apache/nifi/remote/StandardRootGroupPort.java
@@ -518,6 +518,8 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
             // before the request expires
             while (!request.isBeingServiced()) {
                 if (request.isExpired()) {
+                    // Remove expired request, so that it won't block new request to be offered.
+                    this.requestQueue.remove(request);
                     throw new SocketTimeoutException("Read timed out");
                 } else {
                     try {
@@ -572,6 +574,8 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
             // before the request expires
             while (!request.isBeingServiced()) {
                 if (request.isExpired()) {
+                    // Remove expired request, so that it won't block new request to be offered.
+                    this.requestQueue.remove(request);
                     throw new SocketTimeoutException("Read timed out");
                 } else {
                     try {