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

Martijn Visser updated FLINK-41785:
-----------------------------------
    Labels: starter  (was: )

> Document that JDBC connections have no socket timeout by default
> ----------------------------------------------------------------
>
>                 Key: FLINK-41785
>                 URL: https://issues.apache.org/jira/browse/FLINK-41785
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / JDBC, Documentation
>            Reporter: Martijn Visser
>            Priority: Major
>              Labels: starter
>
> The JDBC connector sets no socket timeout on the connections it opens, and 
> pgjdbc and MySQL Connector/J both default {{socketTimeout}} to 0. A statement 
> on a connection whose network stops answering then blocks until the operating 
> system gives up on it. Through Toxiproxy on PostgreSQL 16 and MySQL 9.0, a 
> commit of the exactly-once committer from FLINK-41060 was still blocked after 
> 30 s. FLINK-22889 shows where that ends for an {{XA PREPARE}} on MySQL: the 
> checkpoint expired and the watchdog killed the TaskManagers.
> We should document that users can set {{socketTimeout}} in the JDBC URL, 
> which the exactly-once sink's {{XADataSource}} takes (seconds for pgjdbc, 
> milliseconds for Connector/J), and that it has to be longer than the longest 
> statement, including a wait for the lock of a prepared transaction.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to