AmatyaAvadhanula commented on code in PR #14995:
URL: https://github.com/apache/druid/pull/14995#discussion_r1387658360
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:
##########
@@ -793,13 +793,17 @@ public void onFailure(Throwable t)
status = Status.PUBLISHING;
}
+ // The callback for a successful segment publish may remove a sequence
from the publishingSequences,
+ // which is racy and can allow the same sequence to be added to the set
again.
+ // Create a copy of publishing sequences to which we can only add
elements, and not remove them.
+ final Set<String> publishingSequencesSnapshot = new
HashSet<>(publishingSequences);
Review Comment:
> I think the new code will be simpler if we snapshot both sequences and
publishingSequences and then create a third set which contains
(sequencesSnapshot - publishingSequencesSnapshot) and iterate over that instead
of sequencesSnapshot
As discussed offline, this is not being done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]