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 08:57:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Fangliang Liu updated FLINK-31357:
----------------------------------
    Description: 
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 this unit test `org.apache.flink.connector.jdbc.internal.JdbcTableOutputFormatTest#testJdbcOutputFormat`

Enter the following data

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

> 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 this unit test `org.apache.flink.connector.jdbc.internal.JdbcTableOutputFormatTest#testJdbcOutputFormat`
> Enter the following data
> 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))



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