Skip to content

Commit c610ae1

Browse files
committed
Enhancement Request 37835329 - [37787985->25.09] ENH: Add channel id and next request id to ConnectionException to enable tracing why Channel was closed (main->v25.09)
Remote remote.full on coherence-ce/main success, changes 115625, synced @115625, job.9.20250415223700.14098 [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 115625]
1 parent 809a0ec commit c610ae1

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/net/extend/Channel.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*
3-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
44
*
55
* Licensed under the Universal Permissive License v 1.0 as shown at
66
* https://oss.oracle.com/licenses/upl.
@@ -469,7 +469,9 @@ public boolean closeInternal(boolean fNotify, Throwable e, long cMillis)
469469

470470
synchronized (laStatus)
471471
{
472-
Throwable eStatus = e == null ? new ConnectionException("channel closed", getConnection()) : e;
472+
String sMsg = " channel=" + getId() + " nextRequestId=" + __m_RequestId.get();
473+
Throwable eStatus = e == null ? new ConnectionException("channel closed " + sMsg, getConnection())
474+
: e;
473475
for (Iterator iter = laStatus.iterator(); iter.hasNext(); )
474476
{
475477
com.tangosol.net.messaging.Request.Status status = (com.tangosol.net.messaging.Request.Status) iter.next();

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/net/extend/proxy/NamedCacheProxy.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,11 +591,17 @@ public void entryDeleted(com.tangosol.util.MapEvent evt)
591591
{
592592
if (getCacheService().isRunning())
593593
{
594+
int id = __m_Channel == null ? -1 : __m_Channel.getId();
595+
596+
_trace("NamedCacheProxy:NameCacheDeactivationListener:entryDeleted: closeChannel " + id + " for " + getCacheName(), 6);
594597
closeChannel();
595598
}
596599
}
597600
else
598601
{
602+
int id = __m_Channel == null ? -1 : __m_Channel.getId();
603+
604+
_trace("NamedCacheProxy:NameCacheDeactivationListener:entryDeleted[2]: closeChannel " + id + " for " + getCacheName(), 6);
599605
closeChannel();
600606
}
601607
}
@@ -640,6 +646,9 @@ public void entryUpdated(com.tangosol.util.MapEvent evt)
640646
}
641647
else
642648
{
649+
int id = __m_Channel == null ? -1 : __m_Channel.getId();
650+
651+
_trace("NameCacheProxy:NameCacheDeactivationListener:entryUpdated: closeChannel " + id + " for " + getCacheName(), 6);
643652
closeChannel();
644653
}
645654
}
@@ -786,6 +795,7 @@ public void memberLeft(com.tangosol.net.MemberEvent evt)
786795
}
787796
else
788797
{
798+
_trace("NamedCacheProxy.memberLeft: " + evt + " closing channel=" + channel.getId(), 6);
789799
closeChannel();
790800
}
791801
}

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/net/extend/remoteService/RemoteCacheService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/*
3-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
3+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
44
*
55
* Licensed under the Universal Permissive License v 1.0 as shown at
66
* https://oss.oracle.com/licenses/upl.
@@ -514,6 +514,7 @@ protected void releaseRemoteNamedCache(com.tangosol.coherence.component.net.exte
514514
Channel channel = cache.getChannel();
515515
if (channel != null)
516516
{
517+
_trace(String.format("RemoteCacheService:releaseRemoteNamedCache: channel=%d cacheName=%s", channel.getId(), cache.getCacheName()), 6);
517518
channel.close();
518519
}
519520
}

0 commit comments

Comments
 (0)