-
Notifications
You must be signed in to change notification settings - Fork 4k
azure: use ResumingReader #155287
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
azure: use ResumingReader #155287
Conversation
Previously, the azure client did not use the ResumingReader. This was causing tracing span use after free issues as the client would issue http retries with a span that was already finished. The ResumingReader manages a span for the lifetime of the reader. There is also some evidence in cockroachdb#154483 that the RetryReader built into the azure client did not properly retry errors that occur while reading the body. Fixes: 154849 Release note: none
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
I feel so/so about this change. It brings the implementation of the azure client in line with how the gcs/aws clients are implemented. But it feels like we should able to use the retry logic built into the azure client if we tune it correctly. However, having spent more time than I care to reading the retry logic of the various cloud clients, there is some comfort in knowing the retry logic lives in CRDB code and is uniform. |
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.
Going to merge this now to quiet the test
} | ||
sp.SetTag("path", attribute.StringValue(object)) | ||
|
||
if !opts.NoFileSize { |
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.
i wonder why you removed the NoFileSize logic here.
bors r+ |
Previously, the azure client did not use the ResumingReader. This was causing tracing span use after free issues as the client would issue http retries with a span that was already finished. The ResumingReader manages a span for the lifetime of the reader.
There is also some evidence in #154483 that the RetryReader built into the azure client did not properly retry errors that occur while reading the body.
Fixes: #154849
Release note: none