patrickstuedi commented on a change in pull request #11676:
URL: https://github.com/apache/kafka/pull/11676#discussion_r791157542
##########
File path:
streams/src/main/java/org/apache/kafka/streams/processor/ProcessorContext.java
##########
@@ -85,8 +85,23 @@
* @throws IllegalStateException If store gets registered after
initialized is already finished
* @throws StreamsException if the store's change log does not contain the
partition
*/
+ default void register(final StateStore store,
+ final StateRestoreCallback stateRestoreCallback) {
+ register(store, stateRestoreCallback, null);
+ }
+
+ /**
+ * Register and possibly restores the specified storage engine.
+ *
+ * @param store the storage engine
+ * @param stateRestoreCallback the restoration callback logic for
log-backed state stores upon restart
+ * @param checkpointCallback called to checkpoint position metatadata of
state stores
+ *
+ * @throws IllegalStateException If store gets registered after
initialized is already finished
+ * @throws StreamsException if the store's change log does not contain the
partition
+ */
void register(final StateStore store,
- final StateRestoreCallback stateRestoreCallback);
+ final StateRestoreCallback stateRestoreCallback, final
CheckpointCallback checkpointCallback);
Review comment:
@guozhangwang many thanks for sharing those thoughts! I think tracking
position on a per subtopology/task level is really interesting and worth giving
it more thoughts. It would make things simpler and the code more robust, and
the drawbacks might not actually that big of a problem. Pragmatically given the
point we are with this PR I still suggest we finish the current approach first
and then explore the per task position in a follow-up.
Re checkpoint callback, I think generalizing the name is a good idea.
Thanks again for the great review!
--
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]