-
Notifications
You must be signed in to change notification settings - Fork 18k
x/telemetry/upload: decide upload retry logic #63694
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
Comments
Yes, something should be done. None of the alternatives seem perfect:
|
I am thinking combination of these:
|
From today's discussion:
Not a release blocker. We will pick up in the next sprint. |
Tentatively assigning to @pjweinb. Peter -- does this seem like something you could pick up? |
Looking at the code... |
The current behavior of the upload package is to try to upload once, and if that fails, it just leaves the uploadable report in the 'local' directory, for some future invocation to try to upload. But if the upload package is called many times from different packages, each will try to upload the report. It is likely better that however many upload processes run, to only try to upload a particular report once every (say) 12 hours. If this is the right solution it wold be fairly easy to implement. |
Decision: The uploader should not retry 4xx error codes, but should retry 5xx. When not retrying, the uploader can just delete the uploadable report in the local directory. |
Change https://go.dev/cl/568238 mentions this issue: |
The upload package keeps retrying unconditionally if the POST request ends with non-200 status code. code The upload program will keep retrying...
In case the upload fails due to transient network errors or some internal errors etc, a few retries before giving up completely make sense. But currently telemetry.go.dev upload server also returns
http.StatusBadRequest
, or other errors. In that case, retrying upload with the same data is not desirable.Either make the upload package distinguish retryable and non-retryable status codes, or make the upload server never return an error if the upload shouldn't be retried.
cc @golang/tools-team @pjweinb @findleyr
The text was updated successfully, but these errors were encountered: