This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 396df4569c7f4481611cf04baa6a638d65e7083e Author: opencode <[email protected]> AuthorDate: Sun Oct 11 14:18:31 2026 +0200 Send broadcasts and pings to the checked member snapshot The broadcast snapshots the channel members and returns early when the snapshot is empty, but the non RPC branch then sent with a fresh read of the channel members. A membership change between the check and the send moved the message to another member set than the checked one, or lost it entirely when the fresh read came back empty, which silently dropped the stop notification of the breakdown when the last members had just left. The ping had the same double read for its RPC send. The send now uses the members that were checked to be non empty. --- java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java index 3e1cb1c351..a75198c0a9 100644 --- a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java +++ b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java @@ -320,10 +320,11 @@ public abstract class AbstractReplicatedMap<K, V> protected void ping(long timeout) throws ChannelException { MapMessage msg = new MapMessage(this.mapContextName, MapMessage.MSG_PING, false, null, null, null, channel.getLocalMember(false), null); - if (channel.getMembers().length > 0) { + Member[] channelMembers = channel.getMembers(); + if (channelMembers.length > 0) { try { // send a ping, wait for all nodes to reply - Response[] resp = rpcChannel.send(channel.getMembers(), msg, RpcChannel.ALL_REPLY, (channelSendOptions), + Response[] resp = rpcChannel.send(channelMembers, msg, RpcChannel.ALL_REPLY, (channelSendOptions), (int) accessTimeout); for (Response response : resp) { MapMessage mapMsg = (MapMessage) response.getMessage(); @@ -427,7 +428,7 @@ public abstract class AbstractReplicatedMap<K, V> log.warn(sm.getString("abstractReplicatedMap.broadcast.noReplies")); } } else { - channel.send(channel.getMembers(), msg, channelSendOptions); + channel.send(members, msg, channelSendOptions); } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
