diff --git a/server/src/main/java/com/metamx/druid/master/ServerHolder.java b/server/src/main/java/com/metamx/druid/master/ServerHolder.java index 662aca05323..6cf4d65ce3f 100644 --- a/server/src/main/java/com/metamx/druid/master/ServerHolder.java +++ b/server/src/main/java/com/metamx/druid/master/ServerHolder.java @@ -96,7 +96,7 @@ public class ServerHolder implements Comparable public boolean containsSegment(DataSegment segment) { - return (server.getSegment(segment.getIdentifier()) != null && peon.getSegmentsToLoad().contains(segment)); + return (server.getSegment(segment.getIdentifier()) != null || peon.getSegmentsToLoad().contains(segment)); } @Override diff --git a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java b/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java index 41846f63edc..82e7a3acf88 100644 --- a/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java +++ b/server/src/main/java/com/metamx/druid/master/rules/LoadRule.java @@ -74,7 +74,13 @@ public abstract class LoadRule implements Rule while (actualReplicants < expectedReplicants) { ServerHolder holder = serverQueue.pollFirst(); if (holder == null) { - log.warn("Not enough %s servers[%d] to assign segments!!!", getTier(), serverQueue.size()); + log.warn( + "Not enough %s servers[%d] to assign segment[%s]! Expected Replicants[%d]", + getTier(), + assignedServers.size() + serverQueue.size() + 1, + segment.getIdentifier(), + expectedReplicants + ); break; } if (holder.containsSegment(segment)) {