Skip to content

fix: apply Hikari pool sizing and lifetime settings [2.42] - #25543

Merged
netroms merged 1 commit into
2.42from
fix/flaky-cache-invalidation-test-2.42
Oct 7, 2026
Merged

netroms merged 1 commit into
2.42from
fix/flaky-cache-invalidation-test-2.42

Conversation

@netroms

@netroms netroms commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Hikari ignored connection.pool.min_idle, max_idle_time and max_lifetime_seconds because the pool was started before its sizing was set (minIdle stuck at 10). Every cached integration test context held 10 connections and the Postgres test container ran out (FATAL: sorry, too many clients already), failing CacheInvalidationMessagePublisherTest at context load in Jenkins 2.42 #2394 and #2395.

Local: dhis-test-integration peaks at 43 DB connections instead of ~100; 3137 tests green.

AI Assisted

The Hikari pool was built before its sizing was set, so minimumIdle was
fixed at 10 and connection.pool.min_idle/max_idle_time/max_lifetime_seconds
were ignored. Integration tests set min_idle=3, but every cached Spring test
context still kept 10 connections, exhausting the Postgres test container
(max_connections=100) and failing context loads with "too many clients"
(e.g. CacheInvalidationMessagePublisherTest).

Configure HikariConfig before constructing the data source and add the
connection.pool.min_idle, keep_alive_time_seconds and max_lifetime_seconds
keys as on 2.43 (#21261, #23015). Defaults match the previous effective
Hikari values; max_idle_time is only applied to Hikari when set explicitly
because its 7200s default is sized for c3p0.
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Bugs (required ≤ 0)
E Reliability Rating on New Code (required ≥ A)
1 New Blocker Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@netroms
netroms merged commit a2aad93 into 2.42 Oct 7, 2026
13 of 14 checks passed
@netroms
netroms deleted the fix/flaky-cache-invalidation-test-2.42 branch October 7, 2026 11:32
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.

2 participants