Do not terminate persistent sessions worker on exceptions

Closes #38925

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz
2025-04-15 13:11:05 +02:00
committed by GitHub
parent cb4b6c8c8e
commit 6a37638a95
@@ -75,8 +75,14 @@ public class PersistentSessionsWorker {
try {
process(queue);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
break;
// The arjuna transaction reaper might interrupt this thread due to a long-running transaction.
// But we will not terminate this thread as it will need to continue handling requests.
if (!stop) {
LOG.warn("Caught interrupted exception", e);
}
} catch (RuntimeException e) {
// We will need to continue
LOG.warn("Exception when processing queue events", e);
}
}
}
@@ -165,6 +171,7 @@ public class PersistentSessionsWorker {
try {
t.join(TimeUnit.MINUTES.toMillis(1));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
});