QiuMM commented on issue #6724: Fix issue that tasks failed because of no sink for identifier URL: https://github.com/apache/incubator-druid/pull/6724#issuecomment-451434343 @jon-wei I revert the last commit since it would change the expected behavior and cause the CI failures. > Using the iterator would avoid the ISE, but I think it's still possible to persist a Sink that was already abandoned (i.e., abandonSegment could remove a Sink after that Sink is returned by iterator.next() in persistAll)). I think there is no need to concern this. `abandonSegment` is called in `clear` , `close` and `drop` : 1. In `clear`, here is the code, it will await the dropping. ```java // Drop everything. final List<ListenableFuture<?>> futures = Lists.newArrayList(); for (Map.Entry<SegmentIdentifier, Sink> entry : sinks.entrySet()) { futures.add(abandonSegment(entry.getKey(), entry.getValue(), true)); } // Await dropping. Futures.allAsList(futures).get(); ``` 2. In `close`, it will also await the dropping and shutdown the `persistExecutor`. 3. In `drop`, it means the handoff operation have been finished, which means the the `hydrant`s have been already swapped and will be ignored to persist.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
