From 88919d096f9bb5642e4e9286283f77621a17ca84 Mon Sep 17 00:00:00 2001 From: Michael Wei Date: Thu, 21 May 2015 15:23:13 -0700 Subject: [PATCH] don't remove last logunit, fixes #24 --- .../configmaster/policies/SimpleReconfigurationPolicy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/corfudb/infrastructure/configmaster/policies/SimpleReconfigurationPolicy.java b/src/main/java/org/corfudb/infrastructure/configmaster/policies/SimpleReconfigurationPolicy.java index 4aa124986f3..c6432973f20 100644 --- a/src/main/java/org/corfudb/infrastructure/configmaster/policies/SimpleReconfigurationPolicy.java +++ b/src/main/java/org/corfudb/infrastructure/configmaster/policies/SimpleReconfigurationPolicy.java @@ -40,7 +40,9 @@ public CorfuDBView getNewView(CorfuDBView oldView, NetworkException e) { { for (List nodeList : segment.getGroups()) { - nodeList.removeIf(n ->n.getFullString().equals(e.protocol.getFullString())); + if (nodeList.size() > 1) { + nodeList.removeIf(n -> n.getFullString().equals(e.protocol.getFullString())); + } } }