letaoj commented on code in PR #138:
URL: https://github.com/apache/flink-agents/pull/138#discussion_r2355850588


##########
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:
   Now I got your point. This is not a globally increased sequence number, 
instead, a per-key based.



-- 
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]

Reply via email to