Skip to content

read_rows stream resumption not working? #469

@igorbernstein2

Description

@igorbernstein2

Running the following snippet:

client = bigtable.Client(project="google.com:cloud-bigtable-dev")
instance = client.instance("igorbernstein-dev")
table = instance.table("table1")

rows = table.read_rows(start_key="a", end_key="b", retry=bigtable.table.DEFAULT_RETRY_READ_ROWS.with_deadline(2.0))
for r in rows:
    print(f'row:{r}\n')

Against a java emulator:

public static void main(String[] args) throws Exception {
    Server server =
        ServerBuilder.forPort(1234)
            .addService(
                new BigtableImplBase() {
                  @Override
                  public void readRows(
                      ReadRowsRequest request, StreamObserver<ReadRowsResponse> responseObserver) {
                    System.out.println(Context.current().getDeadline());
                    try {
                      Thread.sleep(100);
                    } catch (InterruptedException e) {
                      responseObserver.onError(e);
                      return;
                    }
                    responseObserver.onError(Status.UNAVAILABLE.asException());
                  }
                })
            .build();

    server.start();
    server.awaitTermination();
  }

I would expect to see multiple attempt rpcs spaced with exponential delay. But I only see one

Metadata

Metadata

Labels

🚨This issue needs some love.api: bigtableIssues related to the googleapis/python-bigtable API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions