Repository navigation
Handle brief traffic bursts and streamline review ratings - #75
Merged
Merged
Conversation
pyroprocyon
marked this pull request as ready for review
December 6, 2026 01:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A brief burst of sign-ins or public catalog reads could receive an immediate busy response as soon as all active slots were in use. Successful ratings also fetched card text they did not return and built fresh JSON mappers to read and write the saved FSRS state.
What changes
Decisions worth a look
Small waiting limits trade a short wait for fewer immediate rejections. At Free-sized local limits, first-attempt success in three 20-person sign-in bursts went from one per burst to two or three. That result still calls for staggered classroom sign-in.
Verification
The pre-push gate ran the full local build, lint, backend, browser, and SonarQube checks, and GitGuardian scanned the complete outgoing commit range.
In a local replay at 0.15 CPU and 512 MiB, the median of five 20-learner rating-wave p95s fell from 2.01 s to 1.64 s after the FSRS mapper change. All 150 acknowledgements per build matched one review log and one schedule advance. This comparison used local PostgreSQL with added database latency.
Manual check
Open a personal deck in two tabs. Start a review in one, edit its current card in the other, and then rate the old question. The review should show the revised card and leave the schedule untouched until the learner rates the new version.