Copilot commented on code in PR #20311:
URL: https://github.com/apache/druid/pull/20311#discussion_r3976199592


##########
embedded-tests/src/test/java/org/apache/druid/testing/embedded/indexing/KafkaBoundedSupervisorTest.java:
##########
@@ -172,6 +173,17 @@ public void 
test_boundedSupervisor_withReversedRange_isUnhealthy()
     Assertions.assertEquals("UNHEALTHY_SUPERVISOR", status.getState());
   }
 
+  /**
+   * Task duration for bounded supervisors in this test. The shared fixture 
uses a 500ms
+   * taskDuration so that unbounded tasks publish quickly, but a bounded task 
publishes on
+   * its own when it reaches its end offset. With the short duration, a 
bounded task that
+   * has not consumed its whole range within one supervisor cycle is rolled 
over at its
+   * current offset, and each successor task is rolled over again before the 
Kafka consumer
+   * finishes starting, so the supervisor never reaches the end offset. Use a 
duration that
+   * no bounded task in this class can exceed.
+   */
+  private static final Period BOUNDED_TASK_DURATION = Period.seconds(60);

Review Comment:
   `BOUNDED_TASK_DURATION` (60s) is shorter than the class’s ingestion wait 
ceiling (120s). If ingestion takes >60s on a slow CI runner, the supervisor can 
still hit the task-duration rollover path during the wait, reintroducing the 
same no-progress loop this change is trying to avoid. Consider deriving the 
task duration from `BOUNDED_SUPERVISOR_INGESTION_TIMEOUT_MILLIS` (and soften 
the “can exceed” wording, since it’s not a guarantee).



-- 
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]

Reply via email to