letaoj commented on code in PR #138: URL: https://github.com/apache/flink-agents/pull/138#discussion_r2355899178
########## runtime/src/main/java/org/apache/flink/agents/runtime/operator/ActionExecutionOperator.java: ########## @@ -392,6 +447,71 @@ public void close() throws Exception { super.close(); } + @Override + public void initializeState(StateInitializationContext context) throws Exception { + super.initializeState(context); + + if (actionStateStore != null) { + Object recoveryMarker = null; + ListState<Object> recoveryMarkerOpState = + getOperatorStateBackend() + .getListState( + new ListStateDescriptor<>( + "recoveryMarker", TypeInformation.of(Object.class))); + Iterable<Object> recoveryMarkers = recoveryMarkerOpState.get(); + if (recoveryMarkers != null) { + for (Object marker : recoveryMarkers) { + // there should be only one recovery marker + recoveryMarker = marker; + break; + } + } + actionStateStore.rebuildState(recoveryMarker); + } + ListState<Long> msgSequenceNumberOpState = Review Comment: can you check if my implementation of using keyed state is correct or not? -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org