Skip to content

Stabilize bootstrap persistence under MySQL load - #401

Merged
rotilho merged 1 commit into
mainfrom
stabilize-bootstrap-persistence
Aug 4, 2026
Merged

rotilho merged 1 commit into
mainfrom
stabilize-bootstrap-persistence

Conversation

@rotilho

@rotilho rotilho commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Replace unlimited discovery buffering with an observable bounded queue. Pause scheduled discovery at target capacity, preserve every admitted transaction across saturation and database retries, and release stalled gap requests for automatic recovery.

Batch duplicate-tolerant inserts, bound cleanup transactions, avoid resolution scans when work cannot progress, and add backlog and query metrics. Add the oldest-selection index and verify clean and populated V10 migrations without changing unchecked rows.

Rewrite gap selection as a deterministic single-result indexed query. On MySQL 8.4.9 with 577,168 unchecked rows, the no-gap path dropped from 8.448 s to 146 ms (about 58x), and account lookups dropped from 577,168 to 1,711 without a gap-specific index.

Verification: ./gradlew test passed in 2m57s.

Replace unlimited discovery buffering with an observable bounded queue. Pause scheduled discovery at target capacity, preserve every admitted transaction across saturation and database retries, and release stalled gap requests for automatic recovery.

Batch duplicate-tolerant inserts, bound cleanup transactions, avoid resolution scans when work cannot progress, and add backlog and query metrics. Add the oldest-selection index and verify clean and populated V10 migrations without changing unchecked rows.

Rewrite gap selection as a deterministic single-result indexed query. On MySQL 8.4.9 with 577,168 unchecked rows, the no-gap path dropped from 8.448 s to 146 ms (about 58x), and account lookups dropped from 577,168 to 1,711 without a gap-specific index.

Verification: ./gradlew test passed in 2m57s.
@rotilho
rotilho requested a review from a team as a code owner August 4, 2026 20:46
@rotilho
rotilho merged commit c506c60 into main Aug 4, 2026
5 checks passed
@rotilho
rotilho deleted the stabilize-bootstrap-persistence branch August 4, 2026 20:52
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.

1 participant