Nikita-Shupletsov commented on code in PR #23093:
URL: https://github.com/apache/kafka/pull/23093#discussion_r3737550463
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/TaskManager.java:
##########
@@ -716,9 +718,18 @@ private Task checkIfTaskFailed(final
StateUpdater.RemovedTaskResult removedTaskR
private StateUpdater.RemovedTaskResult waitForFuture(final TaskId taskId,
final
CompletableFuture<StateUpdater.RemovedTaskResult> future) {
- final StateUpdater.RemovedTaskResult removedTaskResult;
+ StateUpdater.RemovedTaskResult removedTaskResult;
try {
- removedTaskResult = future.get(5, TimeUnit.MINUTES);
+ long minutesWaited = 0L;
+ while (true) {
+ try {
+ removedTaskResult =
future.get(REMOVAL_LOG_INTERVAL_MINUTES, TimeUnit.MINUTES);
+ break;
+ } catch (final java.util.concurrent.TimeoutException
retryTimeout) {
+ minutesWaited += REMOVAL_LOG_INTERVAL_MINUTES;
+ log.warn("Waiting for the removal of task {} from the
state updater for {} minute(s).", taskId, minutesWaited);
Review Comment:
I don't think so. as we are changing the approach here: if the thread dies,
every task needs to be failed unconditionally. previously we thought about it
as the thread shouldn't just die, so when it happened, we wanted to flag it.
Now it just means the task is taking longer(as it was reported in the ticket)
--
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]