[
https://issues.apache.org/jira/browse/ARTEMIS-5694?focusedWorklogId=986010&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-986010
]
ASF GitHub Bot logged work on ARTEMIS-5694:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 06/Oct/25 19:46
Start Date: 06/Oct/25 19:46
Worklog Time Spent: 10m
Work Description: clebertsuconic commented on code in PR #5952:
URL: https://github.com/apache/activemq-artemis/pull/5952#discussion_r2408207833
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java:
##########
@@ -1777,37 +1787,56 @@ public void close(final boolean failed) {
@Override
public void close(final boolean failed, final boolean force) {
synchronized (this) {
- if (closed) {
+ if (closing) {
return;
}
- closed = true;
+ closing = true;
}
if (force) {
context.reset();
}
+ final ScheduledFuture<?> scheduledFuture;
+ if (server.getConfiguration().getCloseTimeout() > 0) {
+ scheduledFuture = server.getScheduledPool().schedule(() -> {
+ long txID = tx != null ? tx.getID() : -1L;
+
+ ActiveMQServerLogger.LOGGER.sessionCloseTimeout(name,
server.getConfiguration().getCloseTimeout(), consumers.size(), txID,
remotingConnection, ThreadDumpUtil.threadDump());
+
+ callDoClose(failed);
Review Comment:
I thought it wouldn't be needed as the context is going away anyways...
But I guess It doesn't hurt.. I made the change.
Issue Time Tracking
-------------------
Worklog Id: (was: 986010)
Time Spent: 20m (was: 10m)
> Lingering sessions after a storage timeout
> ------------------------------------------
>
> Key: ARTEMIS-5694
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5694
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.42.0
> Reporter: Clebert Suconic
> Assignee: Clebert Suconic
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.43.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> We had reports of sessions not closing for an unkown situation, probably on
> storage.
> I am adding a timeout verification and adding extra logs in case this happens.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact