nicktelford commented on code in PR #15264:
URL: https://github.com/apache/kafka/pull/15264#discussion_r1466520246


##########
streams/src/main/java/org/apache/kafka/streams/processor/StateStore.java:
##########
@@ -165,4 +165,22 @@ default Position getPosition() {
             "getPosition is not implemented by this StateStore (" + getClass() 
+ ")"
         );
     }
+
+    /**
+     * Return an approximate count of memory used by records not yet committed 
to this StateStore.
+     * <p>
+     * This method will return an approximation of the memory that would be 
freed by the next call to {@link
+     * #flush()}.
+     * <p>
+     * If no records have been written to this store since {@link 
#init(StateStoreContext, StateStore) opening}, or
+     * since the last {@link #flush()}; or if this store does not support 
atomic transactions, it will return {@code
+     * 0}, as no records are currently being buffered.
+     *
+     * @return The approximate size of all records awaiting {@link #flush()}; 
or {@code 0} if this store does not
+     *         support transactions, or has not been written to since {@link 
#init(StateStoreContext, StateStore)} or
+     *         last {@link #flush()}.

Review Comment:
   Note: the `flush()` references here are a bit misleading. It will all make 
sense when the main KIP-892 implementation lands and this is renamed to 
`commit(Map)` though.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to