aho135 commented on code in PR #20387:
URL: https://github.com/apache/druid/pull/20387#discussion_r4076390211
##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java:
##########
@@ -4488,6 +4488,18 @@ private void createNewTasks() throws
JsonProcessingException
continue;
}
+ // In bounded mode, do not top up replicas for a task group that has
already reached its end offsets.
+ // Otherwise, as completed replicas exit, this loop keeps recreating
replacement replicas whose start
+ // offsets are already at the bounded end, producing an endless churn of
tasks that complete instantly.
+ // This mirrors the completion guard on the task-group recreation path
in this method.
+ if (ioConfig.isBounded() && hasTaskGroupReachedBoundedEnd(groupId)) {
Review Comment:
Good catch — moved the `hasTaskGroupReachedBoundedEnd()` check inside the
`replicas > taskGroup.tasks.size()` branch in c8268972dd, so the metadata-store
lookup only runs when a top-up would otherwise be issued (not for every active
group on every run). Full-replica groups no longer incur the extra SQL read.
The regression test still passes with the fix and fails without it.
--
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]