Skip to content

Bump HikariCP, commons-pool2 and MyBatis - #545

Draft
NicoPiel wants to merge 3 commits into
OpenIntegrationEngine:mainfrom
NicoPiel:modernise/stale-library-bumps
Draft

NicoPiel wants to merge 3 commits into
OpenIntegrationEngine:mainfrom
NicoPiel:modernise/stale-library-bumps

Conversation

@NicoPiel

@NicoPiel NicoPiel commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Bumps three stale database-layer libraries, one commit each:

Library From To
HikariCP 2.5.1 7.1.0
commons-pool2 2.3 2.13.1
MyBatis 3.1.1 3.5.19

This PR originally also bumped commons-dbcp2. Main has since removed the custom DBCP pooling and the dbcp2 dependency, so that commit was dropped and the branch rebased onto main.

Why

MyBatis 3.1.1 dates from 2012, and the pools are equally old.

Reviewer notes

  • One mapper fix: MyBatis 3.5 binds static statements using the declared parameterType. User.selectPreferencesForUser declared java.lang.String but receives an Integer, so it's now java.lang.Integer in all 5 database mappers. This is the same fix upstream Mirth made.
  • All 45 mapper files (443 statements) were audited. Every String/Integer/bean statement's Java call site was traced, and each database's SqlMapConfig.xml was loaded under 3.5.19 with the 24 real argument cases bound. All pass. The #{name} bind parameters from main's event-search SQL injection fix also work under 3.5.
  • The HikariCP settings in use are unchanged in 7.1.0, and connectionTimeout(0) still means wait forever.
  • HikariCP 7 needs only slf4j-api, which already ships.
  • Upstream default changes: HikariCP now sends keepalive pings every 2 minutes, and a SQLTimeoutException no longer evicts the connection.
  • Verification metadata was regenerated from a cold Gradle cache with the command in CONTRIBUTING.md (build dist), and parent POMs that only the old versions used were pruned. The dbcp2 2.14.0 entry stays because the OWASP dependency-check plugin still resolves it. THIRD-PARTY-README now also lists the Javassist copy bundled inside MyBatis.

Testing

  • The CI integration tests pass on all five databases (Derby, MySQL, Oracle, Postgres and SQL Server, plus the Ubuntu Derby and Postgres images): run 41042896053 on 7f8f597, the same three bumps plus the since-dropped dbcp2 commit, before the rebase onto main.
  • Locally: compile, verifyVendoredParity, 137 unit tests, and a staged server on a fresh Derby DB driven through about 30 REST calls (users and preferences, channels, deploy, messages, search, statistics, events).
  • Found while testing, already broken on main, and not touched here: GET /events/count without a level filter returns 500, with MyBatis 3.1.1 too.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Test Results

129 files  ±0  129 suites  ±0   3m 32s ⏱️ +34s
789 tests ±0  789 ✅ ±0  0 💤 ±0  0 ❌ ±0 
915 runs  ±0  909 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit 83622e2. ± Comparison against base commit 6df640d.

♻️ This comment has been updated with latest results.

gibson9583
gibson9583 previously approved these changes Oct 30, 2026

@gibson9583 gibson9583 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks safe to merge.

@mgaffigan

Copy link
Copy Markdown
Contributor

Please fix conflicts. Also: we're expecting you're reviewing, testing, and editing before opening the PR. Including a statement of "never ran CI tests" doesn't make me super confident. You can run them locally with ci/runtests.sh.

@NicoPiel

Copy link
Copy Markdown
Contributor Author

Including a statement of "never ran CI tests"

That's why I announced this in Discord first. I let the agents do their thing and I'm also reviewing these now and running tests. I supposed I could've marked them Drafts.

@NicoPiel
NicoPiel marked this pull request as draft October 30, 2026 13:36
@NicoPiel NicoPiel changed the title Bump HikariCP, commons-dbcp2/pool2 and MyBatis Bump HikariCP, commons-pool2 and MyBatis Oct 30, 2026
@tonygermano

Copy link
Copy Markdown
Member

@NicoPiel You can't have any merge commits in your PR with the project's linear history requirement.

If you hard reset your branch to the myBatis commit before the merge (7f8f597), you can do an interactive rebase and drop the dbcp2 commit. After that you can do a clean rebase on main with only 3 commits in the PR.

I wouldn't worry about the removals missing from gradle/verification-metadata.xml in this case. The Renovate updates leave stuff behind, too. Last time I just did a clean-up PR close to the release to get rid of the cruft.

2.5.1 is from 2016. 7.1.0 is the current release and runs on Java 11+;
it needs only slf4j-api at runtime, which the build already ships (the
metrics and javassist dependencies are optional and unused here).

The calls in HikariConnectionPool are unchanged in 7.x: a
connectionTimeout of 0 still means wait indefinitely, and
ProxyConnection.unwrap(Connection.class) still returns the driver's
connection. Behavior that does change comes from upstream defaults,
such as idle connections now being pinged every two minutes
(keepaliveTime) and SQLTimeoutException no longer evicting a
connection.

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
2.3 is from 2015, and commons-dbcp2 releases from 2.10 on need a recent
pool2. 2.x has stayed source and binary compatible for the pool calls
in KeyEncryptor and FileConnector, which still compile against
2.13.1; the millisecond setters FileConnector uses are deprecated in
favor of Duration ones but behave the same.

commons-parent 34 was only the parent of pool2 2.3, so its checksum
entry is dropped too.

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
3.1.1 is from 2012. 3.5.19 is the last Java 8 release of the 3.5 line.
3.6.0 is only days old, so this stays on 3.5. OGNL and javassist are
still shaded inside the mybatis jar, and nothing else is needed at
runtime.

The 3.5 line binds a simple parameterType's type handler from the
declared type. User.selectPreferencesForUser declared java.lang.String
but is called with the Integer user id, so it now declares
java.lang.Integer in every database's mapper. Upstream Mirth made the
same change when it moved to 3.5.15. The other String and Integer
parameterTypes match what their callers pass.

mybatis-parent 15 was only the parent of 3.1.1, so its checksum entry
is dropped too.

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
@NicoPiel
NicoPiel force-pushed the modernise/stale-library-bumps branch from 439d496 to 83622e2 Compare October 31, 2026 09:59
@NicoPiel

Copy link
Copy Markdown
Contributor Author

Done, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants