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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 1c04ae8e614 MINOR: Improve JavaDocs of KafkaStreams `context.commit()` 
(#14163)
1c04ae8e614 is described below

commit 1c04ae8e614533ebca7768c2f929b424213bf09f
Author: Matthias J. Sax <matth...@confluent.io>
AuthorDate: Tue Aug 8 07:51:59 2023 -0700

    MINOR: Improve JavaDocs of KafkaStreams `context.commit()` (#14163)
    
    Reviewers: Bill Bejeck <b...@confluent.io>
---
 .../org/apache/kafka/streams/processor/api/ProcessingContext.java   | 4 +++-
 .../streams/processor/internals/assignment/AssignmentTestUtils.java | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/processor/api/ProcessingContext.java
 
b/streams/src/main/java/org/apache/kafka/streams/processor/api/ProcessingContext.java
index 30be03753ca..26e1f356419 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/processor/api/ProcessingContext.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/processor/api/ProcessingContext.java
@@ -151,7 +151,9 @@ public interface ProcessingContext {
                          final Punctuator callback);
 
     /**
-     * Request a commit.
+     * Request a commit. Note that calling {@code commit()} is only a request 
for a commit, but it does not execute one.
+     * Hence, when {@code commit()} returns, no commit was executed yet. 
However, Kafka Streams will commit as soon
+     * as possible, instead of waiting for next {@code commit.interval.ms} to 
pass.
      */
     void commit();
 
diff --git 
a/streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentTestUtils.java
 
b/streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentTestUtils.java
index 3fac81d4352..05edb38bf30 100644
--- 
a/streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentTestUtils.java
+++ 
b/streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentTestUtils.java
@@ -805,12 +805,14 @@ public final class AssignmentTestUtils {
         return Collections.singletonMap(SUBTOPOLOGY_0, 
Collections.singleton(new TaskId(1, 1)));
     }
 
-    static void verifyStandbySatisfyRackReplica(final Set<TaskId> taskIds,
+    static void verifyStandbySatisfyRackReplica(
+        final Set<TaskId> taskIds,
         final Map<UUID, String> racksForProcess,
         final Map<UUID, ClientState> clientStateMap,
         final Integer replica,
         final boolean relaxRackCheck,
-        final Map<UUID, Integer> standbyTaskCount) {
+        final Map<UUID, Integer> standbyTaskCount
+    ) {
         if (standbyTaskCount != null) {
             for (final Entry<UUID, ClientState> entry : 
clientStateMap.entrySet()) {
                 final int expected = standbyTaskCount.get(entry.getKey());

Reply via email to