Skip to content

Commit

Permalink
Revert "feat: promote stream wait timeouts to deadlines for point rea…
Browse files Browse the repository at this point in the history
…ds (#848)"

This reverts commit 9b3c601.
  • Loading branch information
igorbernstein2 committed Jun 17, 2021
1 parent 50c0a51 commit cabd0c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 276 deletions.
Expand Up @@ -75,7 +75,6 @@
import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptor;
import com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsRetryingCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.FilterMarkerRowsCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.PointReadTimeoutCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsBatchingDescriptor;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsConvertExceptionCallable;
import com.google.cloud.bigtable.data.v2.stub.readrows.ReadRowsResumptionStrategy;
Expand Down Expand Up @@ -337,7 +336,7 @@ public <RowT> UnaryCallable<Query, RowT> createReadRowCallable(RowAdapter<RowT>
private <ReqT, RowT> ServerStreamingCallable<ReadRowsRequest, RowT> createReadRowsBaseCallable(
ServerStreamingCallSettings<ReqT, Row> readRowsSettings, RowAdapter<RowT> rowAdapter) {

final ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> base =
ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> base =
GrpcRawCallableFactory.createServerStreamingCallable(
GrpcCallSettings.<ReadRowsRequest, ReadRowsResponse>newBuilder()
.setMethodDescriptor(BigtableGrpc.getReadRowsMethod())
Expand All @@ -353,15 +352,11 @@ public Map<String, String> extract(ReadRowsRequest readRowsRequest) {
.build(),
readRowsSettings.getRetryableCodes());

// Promote streamWaitTimeout to deadline for point reads
ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> withPointTimeouts =
new PointReadTimeoutCallable<>(base);

// Sometimes ReadRows connections are disconnected via an RST frame. This error is transient and
// should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code
// which by default is not retryable. Convert the exception so it can be retried in the client.
ServerStreamingCallable<ReadRowsRequest, ReadRowsResponse> convertException =
new ReadRowsConvertExceptionCallable<>(withPointTimeouts);
new ReadRowsConvertExceptionCallable<>(base);

ServerStreamingCallable<ReadRowsRequest, RowT> merging =
new RowMergingCallable<>(convertException, rowAdapter);
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit cabd0c1

Please sign in to comment.