Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ final void updateStateFromResponse(BidiWriteObjectResponse response) {
if (state == State.INITIALIZING || state == State.RETRYING) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Fix typo in PR message.

transitionTo(
stateToReturnToAfterRetry != null ? stateToReturnToAfterRetry : State.RUNNING);
stateToReturnToAfterRetry = null;
}

boolean signalTerminalSuccess = false;
Expand Down Expand Up @@ -679,7 +680,9 @@ final void pendingRetry() {
lock.lock();
try {
validateCurrentStateIsOneOf(State.allNonTerminal);
stateToReturnToAfterRetry = state;
if (state != State.RETRYING && state != State.PENDING_RETRY) {
stateToReturnToAfterRetry = state;
}
transitionTo(State.PENDING_RETRY);
} finally {
lock.unlock();
Expand Down Expand Up @@ -887,10 +890,11 @@ void awaitState(State... anyOf) throws InterruptedException {
lock.lock();
try {
ImmutableSet<State> states = ImmutableSet.copyOf(anyOf);
while (!states.contains(this.state) && !stateUpdated.await(5, TimeUnit.MILLISECONDS)) {
while (!states.contains(this.state)) {
if (resultFuture.isDone()) {
return;
}
stateUpdated.await(5, TimeUnit.MILLISECONDS);
}
} finally {
lock.unlock();
Expand All @@ -913,11 +917,11 @@ public void awaitTakeoverStateReconciliation(Runnable restart) {
public void awaitAck(long writeOffset) throws InterruptedException {
lock.lock();
try {
while (confirmedBytes < writeOffset
&& !confirmedBytesUpdated.await(5, TimeUnit.MILLISECONDS)) {
while (confirmedBytes < writeOffset) {
if (resultFuture.isDone()) {
return;
}
confirmedBytesUpdated.await(5, TimeUnit.MILLISECONDS);
}
} finally {
lock.unlock();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

@RunWith(StorageITRunner.class)
@CrossRun(
backends = {Backend.TEST_BENCH},
backends = {Backend.TEST_BENCH, Backend.PROD},
transports = Transport.GRPC)
@Parameterized(UploadConfigParameters.class)
public final class ITAppendableUploadTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ static BackendResources of(
protectedBucketNames.add(bucketName);
return new BucketInfoShim(
BucketInfo.newBuilder(bucketName)
.setLocation(zone.get().get().getRegion())
.setLocation("us-central1")
.setCustomPlacementConfig(
CustomPlacementConfig.newBuilder()
.setDataLocations(ImmutableList.of(zone.get().get().getZone()))
.setDataLocations(ImmutableList.of("us-central1-c"))
.build())
.setStorageClass(StorageClass.valueOf("RAPID"))
.setHierarchicalNamespace(
Expand Down
Loading