Croway opened a new pull request, #30060:
URL: https://github.com/apache/camel/pull/30060

   Docs only. The SQL and JDBC components have no network timeout of their own, 
and the defaults of the common JDBC drivers and of Agroal used directly leave a 
route stuck on a database that stops answering. Fault-injection tests (a silent 
connection and a reset in front of a real PostgreSQL) showed that a poll or a 
send blocks in a socket read with no error and the consumer health check UP 
until the driver's socket timeout is set.
   
   **sql-component.adoc**: new subsection "Noticing a dead or silent database" 
under "DataSource":
   - the driver socket timeout: property, unit and default for pgjdbc, MySQL 
Connector/J, MariaDB Connector/J, mssql-jdbc and the Oracle thin driver, with 
the Spring Boot (Hikari `data-source-properties`) and Quarkus 
(`quarkus.datasource.jdbc.read-timeout`, since 3.36) settings;
   - pool validation and exception sorting: HikariCP and Quarkus defaults, 
Agroal used directly (no validator, no exception sorter, `acquisitionTimeout` 
0) with a Java example, Spring `SingleConnectionDataSource`;
   - `new HikariDataSource(HikariConfig)` fails fast when the database is down 
(`initializationFailTimeout`);
   - a note that a redelivered Splitter over a `StreamList` whose connection 
broke completes with the rows read so far.
   
   **jdbc-component.adoc**: new section "Noticing a dead or silent database" 
with the driver table, a link to the SQL page for the pool settings, the same 
`StreamList` note, and a note that with `resetAutoCommit=true` the producer 
commits before a `StreamList` is read, which closes the PostgreSQL cursor that 
`statement.fetchSize` uses.
   
   Checked against the sources at the versions on `main`: pgjdbc 42.7.14 
(`PGProperty`, `QueryExecutorImpl`, `PgStatement`), MySQL Connector/J 9.7.0, 
MariaDB Connector/J 4.0.0, mssql-jdbc 12.10.0, Oracle `OracleConnection` 
constants (no public source), Agroal 3.2.1, HikariCP 7.1.0, Spring Framework 
7.0.10 `SingleConnectionDataSource`, Spring Boot 4.0 Hikari binding, Quarkus 
3.40.1.1 (`DataSourceJdbcRuntimeConfig`, `DataSources`, the per-database 
`AgroalConnectionConfigurer`s), and Camel's `ResultSetIterator`, `JdbcProducer` 
and `ScheduledPollConsumerHealthCheck`. The durations are given as approximate 
behaviour of those libraries, not as Camel guarantees. The catalog copies are 
regenerated.
   
   _Claude Code on behalf of Croway_
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to