Repository navigation
Description
Problem
TestCaseResourceIT's bulk and logical-suite tests are the most frequent merge-queue failure. Between
2026-09-25 and 2026-10-13 they failed in 39 lane reports across 34 PRs, on all three database and search
pairings. Two unrelated causes account for 33 of those reports (28 PRs). Neither is caused by the PRs
under test.
1. Jdbi 3.37.1 pins virtual threads, and the IT server's virtual-thread scheduler stops (21 PRs)
Symptom: the logical-suite tests (test_bulkAdd*, test_bulkRemove*,
test_putPreservesLogicalSuiteSearchMembership, test_deprecatedEndpointStillWorks) fail with
Network error: timeout, the SDK's 300 s read timeout. Each time, 7–69 other tests fail in the same
lane, async deletes stop, NamespaceCleanup … still running after PT2M repeats, and MySQL reports
Lock wait timeout exceeded.
All 12 stall dumps the IT watchdog wrote show the same state. They come from five runs: 37753153290,
38164659731, 38164947502, 38300058144 (a push to main) and 38348381347.
- The runner has
processors=4, and all 4 virtual-thread carriers are held by pinned virtual threads
(VirtualThread.parkOnCarrierThread). - Each pinned thread is inside Jdbi's
MemoizingSupplier.init, which is asynchronizedblock before
Jdbi 3.45.4. From there the stack isHikariDataSource.getConnection→ProxyLeakTask.schedule
(leak detection, 60 s by default) →ScheduledThreadPoolExecutor$DelayedWorkQueue.offer→
ReentrantLock.lock. - The thread next in line for that lock is an unmounted virtual thread, and no carrier is free to run
it, so the scheduler stays stuck for the rest of the run. - Anything that waits on virtual-thread work then hangs: async deletes, and search documents built on
reindex-os-doc-build-*beforeOpenSearchBulkSink.writejoins them. Logical-suite add and remove
reindex synchronously, so they time out first.
Production runs the same path: Jdbi 3.37.1, leak detection on by default, and virtual threads for async
work and search document builds.
2. Reading a logical suite returns 404 when one of its test cases is deleted mid-request (8 PRs)
Symptom: test_bulkAddAllTestCasesToLogicalTestSuite or test_bulkAddAllTestCasesWithExcludeIds
fails with Entity not found: testCase <another IT's test case>, usually as the lane's only failure.
mode: alladds every test case in the database to the suite.- After that commits, loading the suite with
*runs
TestSuiteRepository.getTestSummary(List<ResultSummary>), which looks up each listed test case by
name, one at a time. - If another request deletes one of them in that window, the lookup throws and the request returns 404,
even though the suite was already updated.
A user who selects all while ingestion deletes test cases hits the same error.
Fix
- Move to Jdbi 3.49.5, the version
dropwizard-jdbi35.0.0 is built against, and register the
connection-aware SQL annotations with@UseExtensionHandler. Collate pins its own Jdbi and has to
move in lockstep. - Read the suite's test cases in one batch, and leave out results whose test case no longer exists.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone ✅
Activity
Fixes open-metadata#35373: Stop Jdbi pinning virtual threads and the …
Stop Jdbi pinning virtual threads (backport 2.0 #35374, #35469, #35429)…