You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "YesOrNo828 (via GitHub)" <gi...@apache.org> on 2023/06/25 13:12:25 UTC

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

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


##########
flink-connectors/flink-connector-hbase-base/src/main/java/org/apache/flink/connector/hbase/sink/HBaseSinkFunction.java:
##########
@@ -201,6 +208,12 @@ public void invoke(T value, Context context) throws Exception {
     }
 
     private void flush() throws IOException {
+        synchronized (mutationMap) {

Review Comment:
   Adding mutationMap to drop duplicated data on the client side could not avoid the data consistency issue. For example:
   sink.buffer-flush.max-rows=1
   +I(1,...)
   -U(1,...)
   +U(1,...)
   These three rows are put into HBase with the same timestamp version.
   In the end, HBase cannot find the data with rowkey=1.



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