[
https://issues.apache.org/jira/browse/FLINK-23813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402180#comment-17402180
]
Roman Khachatryan commented on FLINK-23813:
-------------------------------------------
Thanks for the details [~Akihito Liang].
The fix merged for 1.14 and 1.13 as dfac7629819fad231ea5f0a0a0aa574299dd083b
and 669f3b56b4c2999fd76c42504dbfa246684dcf34 accordingly.
As for 1.12, it would require backporting qutie some refactoring. As Flink
[update
policy|https://flink.apache.org/downloads.html#update-policy-for-old-releases]
ony requires backporting to a single release, I'm going to remove 1.12.6 from
the Fix versions unless there are any concerns.
> DeleteExecutor NPE
> ------------------
>
> Key: FLINK-23813
> URL: https://issues.apache.org/jira/browse/FLINK-23813
> Project: Flink
> Issue Type: Bug
> Components: Connectors / JDBC
> Affects Versions: 1.14.0, 1.12.5, 1.13.2
> Reporter: Junning Liang
> Assignee: Roman Khachatryan
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.14.0, 1.12.6, 1.13.3
>
> Attachments: image-2021-08-18-10-49-43-941.png
>
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
> This occurs when jdbc disconnected and try to reconnect.
> I need to write data to mysql in upsert way in sql, So it must group by
> unique key and the JdbcBatchingOutputFormat of Jdbc sink would use
> TableJdbcUpsertOutputFormat.
>
> Jdbc would disconnected when The data interval exceeds the set connection
> time.I see that when jdbc reconnect , only
> JdbcBatchingOutputFormat#jdbcStatementExecutor(insert) would
> prepareStatements but TableJdbcUpsertOutputFormat#deleteExecutor would not
> prepareStatements so that come up NPE.
> if in JdbcBatchingOutputFormat have a protected function to reset
> PrepareStatement and TableJdbcUpsertOutputFormat override this function to
> reset deleteExecutor, it would work well.
> prepareStatements
--
This message was sent by Atlassian Jira
(v8.3.4#803005)