[ 
https://issues.apache.org/jira/browse/FLINK-24626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-24626:
-----------------------------------
    Labels: correctness stale-major  (was: correctness)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Major but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 60 days. I have gone ahead and added a "stale-major" to the issue". If this 
ticket is a Major, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> Flink JDBC Sink may lose data in left join
> ------------------------------------------
>
>                 Key: FLINK-24626
>                 URL: https://issues.apache.org/jira/browse/FLINK-24626
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / JDBC
>            Reporter: Kenyore
>            Priority: Major
>              Labels: correctness, stale-major
>
> The JDBC sink will lose some data while using 
> TableBufferReducedStatementExecutor and left join.
> Here are a snippet of executeBatch.
> {code:java}
>     @Override
>     public void executeBatch() throws SQLException {
>         for (Map.Entry<RowData, Tuple2<Boolean, RowData>> entry : 
> reduceBuffer.entrySet()) {
>             if (entry.getValue().f0) {
>                 upsertExecutor.addToBatch(entry.getValue().f1);
>             } else {
>                 // delete by key
>                 deleteExecutor.addToBatch(entry.getKey());
>             }
>         }
>         upsertExecutor.executeBatch();
>         deleteExecutor.executeBatch();
>         reduceBuffer.clear();
>     }
> {code}
> Left join will generate a DETETE row before upsert row and the executeBatch 
> will excute them in a wrong order.Whitch may causes data lose.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to