chia7712 commented on code in PR #17191:
URL: https://github.com/apache/kafka/pull/17191#discussion_r1763792584
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/tasks/DefaultTaskManager.java:
##########
@@ -373,8 +373,16 @@ public void shutdown(final Duration duration) {
t.requestShutdown();
}
signalTaskExecutors();
- for (final TaskExecutor t: taskExecutors) {
- t.awaitShutdown(duration);
+ try {
+ for (final TaskExecutor t: taskExecutors) {
Review Comment:
Could you please add comments for this hacky solution?
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/tasks/DefaultTaskManager.java:
##########
@@ -373,8 +373,16 @@ public void shutdown(final Duration duration) {
t.requestShutdown();
}
signalTaskExecutors();
- for (final TaskExecutor t: taskExecutors) {
- t.awaitShutdown(duration);
+ try {
+ for (final TaskExecutor t: taskExecutors) {
+ t.awaitShutdown(Duration.ofSeconds(10));
+ }
+ } catch (final Exception e) {
Review Comment:
The doc declares the exception type `StreamsException` explicitly, so maybe
we should honor the doc?
--
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]