File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/util Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ public class CacheCommandFactory implements ExtendedModuleCommandFactory {
3636 /**
3737 * Add region so that commands can be cleared on shutdown.
3838 *
39- * @param regionName name of the region
4039 * @param region instance to keep track of
4140 */
4241public void addRegion (BaseRegion region ) {
@@ -46,7 +45,7 @@ public void addRegion(BaseRegion region) {
4645 /**
4746 * Clear all regions from this command factory.
4847 *
49- * @param regionNames collection of regions to clear
48+ * @param regions collection of regions to clear
5049 */
5150public void clearRegions (Collection <BaseRegion > regions ) {
5251regions .forEach ( region -> allRegions .remove ( region .getName () ) );
Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ public EvictAllCommand(String regionName) {
4444
4545@ Override
4646public Object perform (InvocationContext ctx ) throws Throwable {
47- region .invalidateRegion ();
47+ // When a node is joining the cluster, it may receive an EvictAllCommand before the regions
48+ // are started up. It's safe to ignore such invalidation at this point since no data got in.
49+ if (region != null ) {
50+ region .invalidateRegion ();
51+ }
4852return null ;
4953}
5054
You can’t perform that action at this time.
0 commit comments