lvyanquan commented on code in PR #3128:
URL: https://github.com/apache/flink-cdc/pull/3128#discussion_r1554559194


##########
flink-cdc-runtime/src/main/java/org/apache/flink/cdc/runtime/operators/schema/SchemaOperator.java:
##########
@@ -127,4 +136,13 @@ RESPONSE sendRequestToCoordinator(REQUEST request) {
                     "Failed to send request to coordinator: " + 
request.toString(), e);
         }
     }
+
+    @Override
+    public void initializeState(StateInitializationContext context) throws 
Exception {
+        if (context.isRestored()) {
+            if (getRuntimeContext().getIndexOfThisSubtask() == 0) {

Review Comment:
   Because there may be multiple subtasks for the SchemaOperator, but we just 
want to clear the information in the SchemaRegistryHandler once during restart.



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