pnowojski commented on a change in pull request #14390:
URL: https://github.com/apache/flink/pull/14390#discussion_r544297644



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer.java
##########
@@ -1086,8 +1086,8 @@ public void initializeState(FunctionInitializationContext 
context) throws Except
                nextTransactionalIdHintState = 
context.getOperatorStateStore().getUnionListState(
                        NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR_V2);
 
-               if 
(context.getOperatorStateStore().getRegisteredStateNames().contains(NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR))
 {
-                       migrateNextTransactionalIdHindState(context);
+               if 
(context.getOperatorStateStore().getRegisteredStateNames().contains(NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR.getName()))
 {

Review comment:
       Hard to tell. One would have to debug it to understand what's happening.
   
   However maybe it's better to just clean up this code and remove the 
migration fallback path? This check is for people migrating from Flink versions 
<= 1.8, straight to 1.13. We could remove the whole field 
`NEXT_TRANSACTIONAL_ID_HINT_DESCRIPTOR` and 
`migrateNextTransactionalIdHintState` and just state in the release notes, that 
if you are using kafka producer you can not upgrade from Flink 1.8 to Flink 
1.13 directly. You have to first upgrade to Flink `[1.9, 1.12]`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to