You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Fangliang Liu (Jira)" <ji...@apache.org> on 2023/03/07 09:07:00 UTC

[jira] [Commented] (FLINK-31357) A record is deleted before being inserted, it will be deleted

    [ https://issues.apache.org/jira/browse/FLINK-31357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17697315#comment-17697315 ] 

Fangliang Liu commented on FLINK-31357:
---------------------------------------

Hi [~lzljs3620320] , [~jark] , Looking forward to your reply.

> A record is deleted before being inserted, it will be deleted
> -------------------------------------------------------------
>
>                 Key: FLINK-31357
>                 URL: https://issues.apache.org/jira/browse/FLINK-31357
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / JDBC
>    Affects Versions: 1.14.3
>            Reporter: Fangliang Liu
>            Priority: Major
>
> If you have a record in the database and then delete it and add another record with the same data, the data should be added back to the database, but in practice the data may be deleted directly.
> This can be replicated in following unit test
> {code:java}
> org.apache.flink.connector.jdbc.internal.JdbcTableOutputFormatTest#testJdbcOutputFormat{code}
> Enter the following data
> {code:java}
> Tuple2.of(true, new TestEntry(1001, ("More Java"), ("Mohammad Ali"), 11.11, 11))
> Tuple2.of(true, new TestEntry(1001, ("More Java for more dummies"), ("Mohammad Ali"), 33.33, 33)) 
> Tuple2.of(false, new TestEntry(1001, ("More Java for more dummies"), ("Mohammad Ali"), 33.33, 33))
> Tuple2.of(true, new TestEntry(1001, ("More Java for more dummies"), ("Mohammad Ali"), 33.33, 33)) {code}
> The following records are expected to remain in the database, but in fact the data with ID 1001 no longer exists in the database
> {code:java}
> Tuple2.of(true, new TestEntry(1001, ("More Java for more dummies"), ("Mohammad Ali"), 33.33, 33))  {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)