You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/12 03:48:05 UTC

[GitHub] [iceberg] kbendick commented on a diff in pull request #4519: Flink - Log warning when in table upsert mode for Flink 1.12 due to correctness issues

kbendick commented on code in PR #4519:
URL: https://github.com/apache/iceberg/pull/4519#discussion_r870922581


##########
flink/v1.12/flink/src/main/java/org/apache/iceberg/flink/sink/FlinkSink.java:
##########
@@ -375,8 +375,22 @@ private SingleOutputStreamOperator<WriteResult> appendWriter(DataStream<RowData>
       boolean upsertMode = upsert || PropertyUtil.propertyAsBoolean(table.properties(),
           UPSERT_ENABLED, UPSERT_ENABLED_DEFAULT);
 
-      // Validate the equality fields and partition fields if we enable the upsert mode.
+      // `upsert` mode should not be used in Flink 1.12 due to correctness issues.
+      // As part of a patch release, apachee-iceberg-flink-runtime_1.12:0.13.2,
+      // it has been decided the best course of action would be to log a warning
+      // asking people to upgrade, as Flink 1.12 is deprecated from both upstream
+      // Flink as well as Iceberg as of Iceberg 0.14.0. But we allow the configuration
+      // given that it's a patch release and the change would be otherwise very breaking.
+      //
+      // See in https://github.com/apache/iceberg/pull/4364 for more information.
       if (upsertMode) {
+        String deprecationNotice =
+            "This job is running in upsert mode. Upsert mode should not be used with Flink 1.12 due to correctness " +
+            "issues. Please upgrade to Flink 1.13+ if upsert mode is truly needed. If upsert mode is not needed, " +
+            "set the table property `write.upsert.enabled` to 'false' and don't use `upsert(true)` while " +

Review Comment:
   Ok. I kept the language similat to the message before, but happy to update it however.
   
   I can see what you mean by `if truly needed`.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org