mirror of https://github.com/apache/druid.git
bug fix for checking if a segment exists on a node
This commit is contained in:
parent
9eb28254f8
commit
404f6322c6
|
@ -96,7 +96,7 @@ public class ServerHolder implements Comparable<ServerHolder>
|
|||
|
||||
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
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue