This is an automated email from the ASF dual-hosted git repository.

mjsax pushed a commit to branch 4.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/4.2 by this push:
     new da79405eaf5 MINOR: Improve Streams docs for transitory states (#20980)
da79405eaf5 is described below

commit da79405eaf58eed2473ca955b22fe2271304b1bb
Author: Evan Zhou <[email protected]>
AuthorDate: Mon Nov 24 21:07:06 2025 -0600

    MINOR: Improve Streams docs for transitory states (#20980)
    
    This PR improves Kafka Streams documentation for transitory states. It
    is not currently clear that the `PENDING_SHUTDOWN` and `PENDING_ERROR`
    states are not recoverable, and that a restart is required to get back
    to running.
    
    Reviewers: Matthias J. Sax <[email protected]>
---
 streams/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 ae8131b4f5b..377f9aa3124 100644
--- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
+++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
@@ -240,6 +240,11 @@ public class KafkaStreams implements AutoCloseable {
      *     Any state except NOT_RUNNING, PENDING_ERROR or ERROR can go to 
PENDING_SHUTDOWN (whenever close is called)
      *   </li>
      *   <li>
+     *     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 an application back 
to the RUNNING state.
+     *   </li>
+     *   <li>
      *     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.
      *   </li>

Reply via email to