mirror of https://github.com/apache/nifi.git
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.
This commit is contained in:
parent
d698f227df
commit
7423b41e3c
|
@ -518,6 +518,8 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
|
||||||
// before the request expires
|
// before the request expires
|
||||||
while (!request.isBeingServiced()) {
|
while (!request.isBeingServiced()) {
|
||||||
if (request.isExpired()) {
|
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");
|
throw new SocketTimeoutException("Read timed out");
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
@ -572,6 +574,8 @@ public class StandardRootGroupPort extends AbstractPort implements RootGroupPort
|
||||||
// before the request expires
|
// before the request expires
|
||||||
while (!request.isBeingServiced()) {
|
while (!request.isBeingServiced()) {
|
||||||
if (request.isExpired()) {
|
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");
|
throw new SocketTimeoutException("Read timed out");
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue