From 1734154efb7f7a886ac5d9f12f38fc68d3cb9e8b Mon Sep 17 00:00:00 2001 From: Evan Zhou Date: Mon, 24 Nov 2025 11:26:30 -0800 Subject: [PATCH 1/2] improve streams state documentation for transitory states --- .../src/main/java/org/apache/kafka/streams/KafkaStreams.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java index e37634fe8ddaf..705171ab00bf3 100644 --- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java +++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java @@ -241,6 +241,11 @@ public class KafkaStreams implements AutoCloseable { * Any state except NOT_RUNNING, PENDING_ERROR or ERROR can go to PENDING_SHUTDOWN (whenever close is called) * *
  • + * PENDING_SHUTDOWN and PENDING_ERROR are transitory states where the Streams application gracefully closes + * its existing resources before transitioning into their corresponding terminal states. These states are + * not recoverable, and only a restart would get this application back to the RUNNING state. + *
  • + *
  • * Of special importance: If the global stream thread dies, or all stream threads die (or both) then * the instance will be in the ERROR state. The user will not need to close it. *
  • From a1e415bb58a7c91459f4bacd91883a3bbb346bf8 Mon Sep 17 00:00:00 2001 From: Evan Zhou Date: Mon, 24 Nov 2025 11:29:35 -0800 Subject: [PATCH 2/2] reword --- .../src/main/java/org/apache/kafka/streams/KafkaStreams.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java index 705171ab00bf3..0549501cde20e 100644 --- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java +++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java @@ -243,7 +243,7 @@ public class KafkaStreams implements AutoCloseable { *
  • * PENDING_SHUTDOWN and PENDING_ERROR are transitory states where the Streams application gracefully closes * its existing resources before transitioning into their corresponding terminal states. These states are - * not recoverable, and only a restart would get this application back to the RUNNING state. + * not recoverable, and only a restart would get an application back to the RUNNING state. *
  • *
  • * Of special importance: If the global stream thread dies, or all stream threads die (or both) then