Problem
After the SERVER-135094 fix (PR #63037 / backport #40b79dca66f to v9.0), jstests/noPassthrough/txns_cache_errors/transaction_aborted_under_cache_pressure.js still flakes intermittently, failing with:
Expected TemporarilyUnavailable error but none occurred.
Root cause
In the drain loop, the test aborts every leftover session and only treats the abort as proof that cache pressure fired if it returns TemporarilyUnavailable — the error produced when the client's own abort call races a background cache-pressure kill that is still in flight.
In the failing run, every abort instead returned NoSuchTransaction: the background killer had already finished aborting the session before the client's call arrived. This is a different timing outcome of the same underlying mechanism (the cache-pressure killer firing), but the assertion doesn't recognize it, so the test fails even though cache pressure correctly aborted the transactions.
With the idle timeout disabled and transactionLifetimeLimitSeconds set to 24h elsewhere in the test, no other code path can abort these sessions — so either error code is unambiguous proof the cache-pressure killer ran.
Fix
Widen the drain-loop assertion to count both TemporarilyUnavailable and NoSuchTransaction as evidence of a cache-pressure abort, and update the counter name/message accordingly. No change to the filler-thread mechanism introduced by SERVER-135094.
Verification
Ran the fix via Evergreen patch on mongodb-mongo-v9.0 (noPassthrough_gen, amazon-linux2023-arm64-try-sbe-engine): test passed, 0 failures across the 1890-test suite.
- is related to
-
SERVER-135094 transaction_aborted_under_cache_pressure.js flakes on master because WT-18210 shrinks the drain-loop cache-pressure window
-
- Closed
-