fix(discovery): remove @Transactional from applyAutoApprovalRetrospectively #689

Merged
chris merged 1 commit from fix/retroactive-apply-transactional into main 2026-07-21 23:06:12 +02:00
Owner

Summary

Remove @Transactional from both overloads of applyAutoApprovalRetrospectively().\n\n## Problem\n\n@Transactional held a single DB connection for 2-3 minutes during retrospective apply (processing 6825+ candidates). HikariCP leak detection (30s threshold) fired, blocking REQUIRES_NEW progress store updates.\n\n## Fix\n\n- Remove @Transactional from both public overloads\n- Each DB operation auto-commits independently\n- Progress store handles its own REQUIRES_NEW transaction\n- Atomicity intentionally weakened: failed mid-way runs can be retried, only state='pending' candidates re-processed\n\n## Production note\n\nThe affected production run was manually unstuck as part of v1.21.21.\n\n## Verification\n\n- compileJava: pass\n- ClassInstanceServiceTest: pass

## Summary Remove `@Transactional` from both overloads of `applyAutoApprovalRetrospectively()`.\n\n## Problem\n\n`@Transactional` held a single DB connection for 2-3 minutes during retrospective apply (processing 6825+ candidates). HikariCP leak detection (30s threshold) fired, blocking REQUIRES_NEW progress store updates.\n\n## Fix\n\n- Remove `@Transactional` from both public overloads\n- Each DB operation auto-commits independently\n- Progress store handles its own REQUIRES_NEW transaction\n- Atomicity intentionally weakened: failed mid-way runs can be retried, only `state='pending'` candidates re-processed\n\n## Production note\n\nThe affected production run was manually unstuck as part of v1.21.21.\n\n## Verification\n\n- `compileJava`: pass\n- `ClassInstanceServiceTest`: pass
fix(discovery): remove @Transactional from applyAutoApprovalRetrospectively
All checks were successful
Build and Deploy / Detect changed services and test scopes (push) Successful in 3s
Build and Deploy / Smoke API and media worker (push) Has been skipped
Build and Deploy / Smoke web (push) Has been skipped
Build and Deploy / Smoke ML worker (push) Has been skipped
Build and Deploy / Build plants worker image (push) Has been skipped
Build and Deploy / Build people worker image (push) Has been skipped
Build and Deploy / Build converter worker image (push) Has been skipped
Build and Deploy / Build API image (push) Has been skipped
Build and Deploy / Build media worker image (push) Has been skipped
Build and Deploy / Build ML worker image (push) Has been skipped
Build and Deploy / Build web image (push) Has been skipped
Build and Deploy / Deploy API (push) Has been skipped
Build and Deploy / Deploy web (push) Has been skipped
Build and Deploy / Deploy media worker (push) Has been skipped
Build and Deploy / Deploy ML worker (push) Has been skipped
Build and Deploy / Deploy plants worker (push) Has been skipped
Build and Deploy / Deploy people worker (push) Has been skipped
Build and Deploy / Deploy converter worker (push) Has been skipped
Build and Deploy / Clean Docker build artifacts (push) Has been skipped
Build and Deploy / Run scoped PR tests (push) Successful in 2m29s
e4d984dfc8
Remove @Transactional from both overloads of applyAutoApprovalRetrospectively().
The annotation was holding a single DB connection for 2-3 minutes during
retrospective apply (processing 6825+ candidates), causing HikariCP leak
detection (30s threshold) to fire and blocking REQUIRES_NEW progress store
updates.

With this change, each DB operation auto-commits independently. Progress store
handles its own REQUIRES_NEW transaction. Atomicity is intentionally weakened —
failed mid-way runs can be retried, only state='pending' candidates are
re-processed.

The affected production run was manually unstuck as part of v1.21.21.
chris merged commit d52e2a6b63 into main 2026-07-21 23:06:12 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
chris/memories!689
No description provided.