### Eclipse Workspace Patch 1.0 #P JGroups Index: src/org/jgroups/blocks/LazyRemovalCache.java =================================================================== RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/blocks/LazyRemovalCache.java,v retrieving revision 1.4 diff -u -r1.4 LazyRemovalCache.java --- src/org/jgroups/blocks/LazyRemovalCache.java 31 Mar 2010 11:22:16 -0000 1.4 +++ src/org/jgroups/blocks/LazyRemovalCache.java 14 Apr 2010 04:03:32 -0000 @@ -116,14 +116,28 @@ public void retainAll(Collection keys, boolean force) { if(keys == null || keys.isEmpty()) return; - if(force) + if(force) { map.keySet().retainAll(keys); + // JGRP-1190 someone wants whatever was retained, so mark !removable + for(Map.Entry> entry: map.entrySet()) { + Entry val=entry.getValue(); + if(val != null) { + val.removable=false; + } + } + } else { for(Map.Entry> entry: map.entrySet()) { - if(!keys.contains(entry.getKey())) { - Entry val=entry.getValue(); - if(val != null) + Entry val=entry.getValue(); + if(val != null) { + if(!keys.contains(entry.getKey())) { val.removable=true; + } + else { + // JGRP-1190 If the entry was marked removable, it + // seems someone still wants it, so remove that mark + val.removable=false; + } } } } Index: src/org/jgroups/protocols/TP.java =================================================================== RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/TP.java,v retrieving revision 1.304 diff -u -r1.304 TP.java --- src/org/jgroups/protocols/TP.java 7 Apr 2010 10:59:30 -0000 1.304 +++ src/org/jgroups/protocols/TP.java 14 Apr 2010 04:03:32 -0000 @@ -1239,11 +1239,12 @@ } } } - } - // fix for https://jira.jboss.org/jira/browse/JGRP-918 - logical_addr_cache.retainAll(members); - UUID.retainAll(members); + // fix for https://jira.jboss.org/jira/browse/JGRP-918 + logical_addr_cache.retainAll(members); + UUID.retainAll(members); + } + break; case Event.CONNECT: