Skip to content

Commit

Permalink
fix spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
mattisonchao committed Nov 15, 2024
1 parent c14eabf commit d02298e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CancellationException;

import lombok.NonNull;

final class ReadBatch extends BatchBase implements Batch, StreamObserver<ReadResponse> {
Expand Down Expand Up @@ -86,11 +85,12 @@ public void onError(Throwable batchError) {
@Override
public void onCompleted() {
// complete pending request if the server close stream without any response
gets.forEach(g -> {
if (!g.callback().isDone()) {
g.fail(new CancellationException());
}
});
gets.forEach(
g -> {
if (!g.callback().isDone()) {
g.fail(new CancellationException());
}
});
factory.getReadRequestLatencyHistogram().recordSuccess(System.nanoTime() - startSendTimeNanos);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ public void onError(Throwable t) {
public void onCompleted() {
synchronized (WriteStreamWrapper.this) {
// complete pending request if the server close stream without any response
pendingWrites.forEach(f -> {
if (!f.isDone()) {
f.completeExceptionally(new CancellationException());
}
});
pendingWrites.forEach(
f -> {
if (!f.isDone()) {
f.completeExceptionally(new CancellationException());
}
});
}
}

Expand Down

0 comments on commit d02298e

Please sign in to comment.