Repository navigation
fix(core-sync): an approval wait stays inside the server's rate limit, and a 429 reads as a wait - #4857
Merged
Conversation
…, and a 429 reads as a wait
…no team stop report
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.
Summary
approval_sessionevery 1.5 s. Each call asked for a full sync pass:GET /sync/scopesplus one pull per scope, every team included. With one team that is 120 calls a minute, the server's per sign-in limit (0051, Rate limits), so a device waiting for approval met 429rate_limitedafter about two minutes. Seen on the E2E rig in Check 10 and its retests.PassReason::ApprovalPoll. That pass reads the scopes body and the personal scope only, where the session's steps and the approval arrive. An idle poll costs 2 calls (80 a minute) whatever the teams.Wake::take.Retry-Afterpasses, with the scheduler's 1 h cap. A call inside the hold answerssync.rate_limitedwith the wait left and sends nothing. Before, only scheduler passes waited, so Sync Now, the upload sheet and the key flows sent into the limit again.sync.rate_limitedandsync.restore_check_unavailableno longer read "TablePro Sync cannot be reached ... once you are online". They now say TablePro Sync asked this Mac to wait.sync.servertakes the general "could not finish" wording. Windows already words each code on its own.Retry-After.Test plan
enginewake::an_approval_poll_runs_only_when_nothing_wider_asked,wake::approval_polls_that_never_stop_do_not_hold_off_the_poll.device_flowsapproval::a_running_session_s_poll_asks_only_for_the_personal_scope(main records a fullPassSoon),approval::an_ended_session_s_poll_asks_for_no_pull.core_engineapproval::an_approval_poll_reads_the_scopes_body_and_the_personal_scope_alone,approval::an_approval_poll_sends_no_team_s_stop_report.http::tests::a_429_holds_every_call_of_the_sign_in_until_its_retry_after_passes.ProviderMovesTestsserverWaitIsNotOffline,serverErrorIsNotOffline.verify.sh --platform windows --jobs 4 core tablepro-sync: PASS, 1336 cases.cargo clippy --locked -p tablepro-sync -p tablepro-sync-testing -p tablepro-sync-host -p tablepro-ffi --all-targets -- -D warnings: clean.verify.sh --jobs 4 test ProviderMovesTests: PASS, 58 cases.verify.sh linton both Swift files: 0 violations.