-
Notifications
You must be signed in to change notification settings - Fork 331
feat(sync-service): cheap admission control (Tier 0) with post-load_shape reclassification #4359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
alco
wants to merge
24
commits into
main
Choose a base branch
from
alco/cheap-admission-control
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1929c7c
chore(sync-service): add cheap admission control implementation plan
alco c8fd3f1
feat(sync-service): add AdmissionControl.try_swap/4
alco 89ddcd6
fix(sync-service): address review feedback on try_swap/4
alco ca85efa
feat(sync-service): cheap Tier 0 admission + post-load_shape reclassi…
alco 739ae54
fix(sync-service): default max_concurrent_requests in Shapes.Api
alco af29589
chore(sync-service): polish admission_kind comment and reclassify fal…
alco 44d35d2
chore: changeset for cheap admission control
alco 5be3eb4
Remove the implementation plan file (committed by accident)
alco a284dae
revert(sync-service): drop Api.max_concurrent_requests struct default
alco 3f2f976
Simplify explainer comments in ServeShapePlug
alco fe3deac
fix(sync-service): preserve Content-Type on admission 503 responses
alco 555eb24
fix(sync-service): rework AdmissionControl.try_swap/4 atomicity
alco 89f5c39
Add missing @spec for ShapeStatus.has_shape_handle?()
alco e51b2fb
Clean up admission control code in ServeShapePlug
alco 989fc00
Remove excessive prose from admission control tests
alco fcca98c
perf(sync-service): add read_concurrency to per-request hot-path ETS …
alco ed04f5a
feat(sync-service): hold :initial permit across snapshot-pool checkout
alco 957c5c1
Remove excessively verbose comments
alco 1b073ca
Dedupe atomic counter ops by reusing local helper functions
alco 273893f
fixup! Dedupe atomic counter ops by reusing local helper functions
alco 43c7384
Tighten changeset wording for cheap admission control
alco 5e98e90
Add @spec for Shapes.get_merged_log_stream/3
alco 3943d20
Assert admission residency after :initial->:existing swap in router test
alco a39f565
Add regression test for SnapshotError-vs-must_refetch 503/409 race
alco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@core/sync-service': patch | ||
| --- | ||
|
|
||
| Cheap admission control for shape requests. `:check_admission` now runs at the front of the request pipeline and classifies requests using a single `:ets.member/2` lookup on `?handle=`, removing the SQLite-backed `:resolve_existing_shape` step that previously ran before admission and saturated the read pool under thundering herd (bottleneck 1 of #4266). |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it mean if the try_swap fails?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to
try_swapfails only if the:existingbucket is already at capacity. An unlikely case in practice since we configure it with a higher value than:initial.In any case, if the swap fails, the current request keeps holding the
:initialpermit until it's released in theafterclause of thecallfunction.