[
https://issues.apache.org/jira/browse/ARTEMIS-5694?focusedWorklogId=986000&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-986000
]
ASF GitHub Bot logged work on ARTEMIS-5694:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 06/Oct/25 19:03
Start Date: 06/Oct/25 19:03
Worklog Time Spent: 10m
Work Description: brusdev commented on code in PR #5952:
URL: https://github.com/apache/activemq-artemis/pull/5952#discussion_r2408029887
##########
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:
Resetting the context should avoid to execute pending tasks and free linked
resources.
Issue Time Tracking
-------------------
Worklog Id: (was: 986000)
Remaining Estimate: 0h
Time Spent: 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: 10m
> 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