-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gazette: refactor retry, introduce backoffs, and fixing routing
Previously, gazette routing was previously broken in some subtle ways: * The process ID of a prior response was sent in the next request, causing "ProcessID doesn't match our own" errors in production. * Improperly assuming that endpoints present in response headers are reach-able from the client. We need to condition that assumption on the `do_not_proxy` flag. * `append` routine was not leveraging a prior response header to route its next attempt. Sleep-back backoffs are also introduced to all client routines, rather than making them a responsibility of the caller. This standardizes handling and prevents accidental thundering-herds of retries if a caller forgets to put in a backoff. Now callers don't need to worry about it, and must only decide whether to re-poll, drop to cancel, log, or take some other action. We additionally want to surface a notion of how many operation _attempts_ there have been since the last success. This is important both for logging (logged attempts in Go implementations are useful), and also for client determinations of when to give up. Update simd_doc::Parser::chunk to be able to recover should a caller provide discontinuous partial documents. This was a missing re-entrancy case when retrying a ReadJsonLines stream. Reserve a simd_doc::Parser::transcode_many() buffer based on the input size, to prevent frequent re-allocations in the common usage of ReadJsonLines.
- Loading branch information
1 parent
6622e0e
commit eb4884e
Showing
14 changed files
with
321 additions
and
161 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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.