Skip to content

Commit a590ae3

Browse files
authored
fix: include invocation-id for resumable PUTs (#2047)
Change BlobWriteChannel to us Retrying.run so it will receive an invocation id
1 parent 30c71a0 commit a590ae3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/BlobWriteChannel.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.storage;
1818

19-
import static com.google.cloud.RetryHelper.runWithRetries;
2019
import static java.util.Objects.requireNonNull;
2120
import static java.util.concurrent.Executors.callable;
2221

@@ -28,6 +27,7 @@
2827
import com.google.cloud.RetryHelper;
2928
import com.google.cloud.WriteChannel;
3029
import java.math.BigInteger;
30+
import java.util.function.Function;
3131
import java.util.function.Supplier;
3232
import org.checkerframework.checker.nullness.qual.NonNull;
3333

@@ -186,7 +186,9 @@ private static StorageException unrecoverableState(
186186
@Override
187187
protected void flushBuffer(final int length, final boolean lastChunk) {
188188
try {
189-
runWithRetries(
189+
Retrying.run(
190+
getOptions(),
191+
algorithmForWrite,
190192
callable(
191193
new Runnable() {
192194
@Override
@@ -274,9 +276,7 @@ public void run() {
274276
}
275277
}
276278
}),
277-
getOptions().getRetrySettings(),
278-
algorithmForWrite,
279-
getOptions().getClock());
279+
Function.identity());
280280
} catch (RetryHelper.RetryHelperException e) {
281281
throw StorageException.translateAndThrow(e);
282282
}

0 commit comments

Comments
 (0)