Repository navigation
Conversation
The old 4.0.3 version was pinned for JDK 8 compatibility, which is no longer required (project baseline is Java 11). HikariCP 7.1.0 ships Java 11 bytecode and only uses classic slf4j APIs, so it stays binary compatible with the slf4j-api 1.7.36 used by the project and Flink. - extract hikaricp.version property in root pom to avoid two hardcoded and potentially diverging versions - add slf4j-api exclusion in flink-cdc-base, consistent with flink-connector-mysql-cdc Behavior note: since HikariCP 6.2.1 keepaliveTime defaults to 2 minutes (was disabled), idle pool connections are now probed periodically. Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
Upgrade the bundled HikariCP connection pool from
4.0.3to7.1.0(latest).JIRA: https://issues.apache.org/jira/browse/FLINK-40783
Version
4.0.3was pinned for JDK 8 compatibility, which is no longer aconstraint since the project baseline moved to Java 11. Compatibility of
7.1.0with this project was verified at the bytecode level before upgrading:
7.1.0ships Java 11 bytecode (class file major version 55, no multi-releasevariants), matching the project's
source/target = 11baseline.Logger.debug/warn/error,LoggerFactory.getLogger),so it remains binary compatible with the
slf4j-api 1.7.36used by this projectand shipped by the Flink runtime — no fluent-API (
atInfo()etc.) usage thatwould break on slf4j 1.7.x.
7.1.0, including the two internalclasses relied upon:
HikariProxyConnection(used by the overriddenPostgresConnection#connection()forinstanceof+unwrap) andHikariPool.PoolInitializationException(caught byPooledDataSourceFactory).Brief change log
com.zaxxer:HikariCPfrom4.0.3to7.1.0.hikaricp.versionproperty in the root pom; the version was previouslyhardcoded in two places (
flink-cdc-baseandflink-connector-mysql-cdc).slf4j-apiexclusion to the HikariCP dependency inflink-cdc-base,consistent with the existing declaration in
flink-connector-mysql-cdc.Behavior note for reviewers: since HikariCP 6.2.1,
keepaliveTimedefaults to2 minutes (previously disabled). Idle pool connections are now probed
periodically, which generally protects long-running CDC jobs from silently
dropped connections; the extra load is one ping per idle connection every
2 minutes.
Verifying this change
This change added no new tests; it was verified with existing test suites plus
manual checks (all on JDK 11):
flink-cdc-basefull test suite passes (31/31).MySqlSourceITCase(64/64, MySQL 5.7) and
PostgresSourceITCase(50 run, 0 failures, 1 skippedby its own
assumeThatguard — PostgreSQL 14) pass. These cover the fullsnapshot + incremental pipeline through the HikariCP 7.1.0 pool, including the
HikariProxyConnectioninstanceof/unwrap path inPostgresConnection.flink-sql-connector-mysql-cdc,flink-sql-connector-postgres-cdcandflink-cdc-pipeline-connector-mysqlbundle HikariCP
7.1.0; thecom.zaxxerrelocation is correctly appliedwhere configured (0 unrelocated leaks), and the
module-info.classnewlyadded in 7.x is filtered by the existing global shade filter.
jar with
slf4j-api 1.7.36on JDK 11 against a real MySQL container — poolstartup logging, DDL/DML/query, proxy
instanceof/unwrap,PoolInitializationExceptionpath, pool MXBean stats and clean shutdown allbehave correctly (no
NoSuchMethodError).keepaliveTimereads120000 ms, and idle connections do receive periodic
COM_PINGprobes(observed via the server-side
Com_admin_commandsstatus counter).Documentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code qwen3.8-max
🤖 Generated with Claude Code