-
[OPIK-5231] [BE] fix: prevent parallel execution of trace threads closing job (#5814)
发布于
2026-03-25 13:14:30 +00:00 - [OPIK-5231] [BE] fix: prevent parallel execution of trace threads closing job
Add holdUntilExpiry flag to bestEffortLock that skips the doFinally
lock release, letting the TTL expire naturally. This ensures only one
pod runs the closing job per cycle — other pods hit the held lock and
skip via the fallback path.Previously all 8 pods ran the job every cycle because the lock was
released in ~ms (on reactive chain completion), allowing the next pod
to immediately acquire it.- [OPIK-5231] [BE] fix: use job interval as lock TTL instead of separate config
Eliminates config drift risk — the lock TTL is now always the job
interval, so there's no chance of changing one without the other.- [OPIK-5231] [BE] fix: remove unused closeTraceThreadJobLockTime config
Lock TTL now derives from the job interval, so the separate lock time
config is no longer needed.- [OPIK-5231] [BE] fix: remove dead code and add holdUntilExpiry integration test
- Remove unused 3-arg runAction(Lock, Mono, LockInstance) overload
- Add integration test verifying lock remains held after action completes
when holdUntilExpiry=true
下载附件