diff --git a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java index 061e51b1340..b70286fd036 100644 --- a/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java +++ b/server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java @@ -325,7 +325,13 @@ public class RealtimePlumber implements Plumber { final Interval interval = sink.getInterval(); - // use a file to indicate that pushing has completed + // Bail out if this sink has been abandoned by a previously-executed task. + if (sinks.get(truncatedTime) != sink) { + log.info("Sink[%s] was abandoned, bailing out of persist-n-merge.", sink); + return; + } + + // Use a file to indicate that pushing has completed. final File persistDir = computePersistDir(schema, interval); final File mergedTarget = new File(persistDir, "merged"); final File isPushedMarker = new File(persistDir, "isPushedMarker");