Repository navigation
fix(core-sync): a server that never answers is out of reach in seconds, and the engine opens without waiting on it - #4688
Merged
Conversation
…s, and the engine opens without waiting on it
- Small calls wait `ANSWER_TIMEOUT` (10 s) for their answer to start: token refresh, license, JWKS, discovery, the generated client, the scopes read. Transfers keep 30 s.
- `Account::signed_in_as` answers from the last published complete sign-in, so the engine opens while the launch refresh waits.
- A pass after a retryable failure reports `Waiting { retry_in_ms: 0 }` until the scopes read answers.
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
ANSWER_TIMEOUT(10 s). Before, it took the client's 30 s request timeout per call.Account::signed_in_asanswers from the last published sign-in that names the account and the device, so the sync engine opens and showslast_synced_mswhile the launch refresh still waits on the server. An incomplete or unpublished sign-in still waits for the call in flight, as before.Waiting { retry_in_ms: 0 }until the scopes read answers, whoever runs it. The backoff's end keeps Waiting too. Before, every retry said Syncing for the length of its timeout.Test plan
http: the scopes read of a server that never answers fails as the network within the answer window.oauth: a token refresh against such a server isUnreachablewithin the window.account: the sign-in names itself while a refresh waits on such a server; one with no device yet waits for the refresh.tests/engine/status.rs: a pass after a network failure says Waiting, then Syncing only once answered.verify.sh --platform windows corefor cloud-api, account, sync and ffi all PASS. Clippy-D warningspasses on host and in thetablepro-linux-devcontainer.verify.sh --platform windows bindingspasses with no change.-D warningson the touched crates passes.