Skip to content
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

fix: include invocation-id for resumable PUTs #2047

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.storage;

import static com.google.cloud.RetryHelper.runWithRetries;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.Executors.callable;

Expand All @@ -28,6 +27,7 @@
import com.google.cloud.RetryHelper;
import com.google.cloud.WriteChannel;
import java.math.BigInteger;
import java.util.function.Function;
import java.util.function.Supplier;
import org.checkerframework.checker.nullness.qual.NonNull;

Expand Down Expand Up @@ -186,7 +186,9 @@ private static StorageException unrecoverableState(
@Override
protected void flushBuffer(final int length, final boolean lastChunk) {
try {
runWithRetries(
Retrying.run(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am IIUC runWithRetries did not use InvocationId support and using Retrying.run() will address that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct

getOptions(),
algorithmForWrite,
callable(
new Runnable() {
@Override
Expand Down Expand Up @@ -274,9 +276,7 @@ public void run() {
}
}
}),
getOptions().getRetrySettings(),
algorithmForWrite,
getOptions().getClock());
Function.identity());
} catch (RetryHelper.RetryHelperException e) {
throw StorageException.translateAndThrow(e);
}
Expand Down