eduwercamacaro commented on code in PR #20749:
URL: https://github.com/apache/kafka/pull/20749#discussion_r2682049133
##########
streams/src/main/java/org/apache/kafka/streams/processor/StateStore.java:
##########
@@ -71,6 +71,8 @@ public interface StateStore {
*/
void init(final StateStoreContext stateStoreContext, final StateStore
root);
+ default void preInit(final StateStoreContext stateStoreContext) {}
+
Review Comment:
This is the part of KIP-1035 that needs to be changed so that this new
method can be added to the StateStore interface.
`preInit` essentially adds a new callback for StateStores that allows us to
initialize resources before the StateStore is assigned to a `StreamThread` via
`StateStore#init`. For the case of RocksDBStateStore, we will load current
offsets from the ColumnFamily.
On this PR, we need this new method because it allows the StateDirectory
class to open the state stores without assigning them to a StreamThread.
--
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]