uds5501 commented on code in PR #18466:
URL: https://github.com/apache/druid/pull/18466#discussion_r2371079536
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:
##########
@@ -848,66 +857,15 @@ public void onFailure(Throwable t)
// We need to copy sequences here, because the success callback in
publishAndRegisterHandoff removes items from
// the sequence list. If a publish finishes before we finish iterating
through the sequence list, we can
// end up skipping some sequences.
- List<SequenceMetadata<PartitionIdType, SequenceOffsetType>>
sequencesSnapshot = new ArrayList<>(sequences);
- for (int i = 0; i < sequencesSnapshot.size(); i++) {
- final SequenceMetadata<PartitionIdType, SequenceOffsetType>
sequenceMetadata = sequencesSnapshot.get(i);
- if (!publishingSequences.contains(sequenceMetadata.getSequenceName())
- &&
!publishedSequences.contains(sequenceMetadata.getSequenceName())) {
- final boolean isLast = i == (sequencesSnapshot.size() - 1);
- if (isLast) {
- // Shorten endOffsets of the last sequence to match currOffsets.
- sequenceMetadata.setEndOffsets(currOffsets);
- }
-
- // Update assignments of the sequence, which should clear them.
(This will be checked later, when the
- // Committer is built.)
- sequenceMetadata.updateAssignments(currOffsets,
this::isMoreToReadAfterReadingRecord);
- publishingSequences.add(sequenceMetadata.getSequenceName());
- // persist already done in finally, so directly add to publishQueue
- publishAndRegisterHandoff(sequenceMetadata);
- }
- }
Review Comment:
Just moved, re-moving it to reduce diff.
--
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]