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

[GitHub] [flink] zjuwangg commented on a diff in pull request #20542: [FLINK-28910][Connectors/hbase]Fix potential data deletion while updating HBase rows

zjuwangg commented on code in PR #20542:
URL: https://github.com/apache/flink/pull/20542#discussion_r971943575


##########
flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/sink/HBaseSinkFunction.java:
##########
@@ -191,8 +195,10 @@ private void checkErrorAndRethrow() {
     public void invoke(T value, Context context) throws Exception {
         checkErrorAndRethrow();
 
-        mutator.mutate(mutationConverter.convertToMutation(value));
-
+        Mutation mutation = mutationConverter.convertToMutation(value);
+        synchronized (mutationMap) {
+            mutationMap.put(mutation.getRow(), mutation);

Review Comment:
   In this way, all mutations with the same rowkey value will only remains the last one.
   But `mutationConverter` behavior is not controlled, which means such mutations list will casuse data quaility problem.
   `
   -D (rk1, f1:v1)     
   +I (rk1, f2:v2)
   `



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

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