diff --git a/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java b/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java index 38b811ca179..ffe419246ed 100644 --- a/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java +++ b/server/src/main/java/com/metamx/druid/loading/OmniSegmentLoader.java @@ -211,7 +211,7 @@ public class OmniSegmentLoader implements SegmentLoader private synchronized void addSegment(DataSegment segment) { - if (! segments.add(segment)) { + if (segments.add(segment)) { currSize += segment.getSize(); } } diff --git a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java b/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java index a9fe23d1af6..e7aa60d4bff 100644 --- a/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java +++ b/server/src/main/java/com/metamx/druid/loading/SingleSegmentLoader.java @@ -210,7 +210,7 @@ public class SingleSegmentLoader implements SegmentLoader private synchronized void addSegment(DataSegment segment) { - if (! segments.add(segment)) { + if (segments.add(segment)) { currSize += segment.getSize(); } }