diff --git a/server/src/main/java/io/druid/curator/inventory/CuratorInventoryManager.java b/server/src/main/java/io/druid/curator/inventory/CuratorInventoryManager.java index 444d46ad386..aaa4409221c 100644 --- a/server/src/main/java/io/druid/curator/inventory/CuratorInventoryManager.java +++ b/server/src/main/java/io/druid/curator/inventory/CuratorInventoryManager.java @@ -263,12 +263,13 @@ public class CuratorInventoryManager final ContainerClass container = strategy.deserializeContainer(child.getData()); - ContainerHolder oldContainer = containers.get(containerKey); - if (oldContainer == null) { + log.info("Container[%s] updated.", child.getPath()); + ContainerHolder holder = containers.get(containerKey); + if (holder == null) { log.warn("Container update[%s], but the old container didn't exist!? Ignoring.", child.getPath()); } else { - synchronized (oldContainer) { - oldContainer.setContainer(strategy.updateContainer(oldContainer.getContainer(), container)); + synchronized (holder) { + holder.setContainer(strategy.updateContainer(holder.getContainer(), container)); } } diff --git a/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java b/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java index d0b24ea5653..620f75c6614 100644 --- a/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java +++ b/server/src/main/java/io/druid/server/coordination/BatchDataSegmentAnnouncer.java @@ -121,6 +121,7 @@ public class BatchDataSegmentAnnouncer extends AbstractDataSegmentAnnouncer { final SegmentZNode segmentZNode = segmentLookup.remove(segment); if (segmentZNode == null) { + log.warn("No path to unannounce segment[%s]", segment.getIdentifier()); return; }