nodejs-bigtable icon indicating copy to clipboard operation
nodejs-bigtable copied to clipboard

table.getRows() is never completed

Open RajaOne opened this issue 4 years ago • 2 comments

As of September 30th, we are experiencing issues with queries to bigtable on our GCP production environment. We have two other environments as separate GCP projects that run the same code but do not have this problem. Nothing changed in the code that could have impacted the bigtable client. The code below started hanging seemingly all of a sudden. We noticed that getRows only gets stuck if there should be no records returned. The workaround as suggested here #612 does not work as it introduced other errors like Error: 2 UNKNOWN: Stream removed which I'm not sure if it is related to the actual problem or the workaround. Also, the rows are not fetched from an emulator but from a real bigtable instance running on GCP.

Environment details

  • OS: Docker container (node:12.11.1) running on kubernetes engine on GCP and Windows 10
  • Node.js version: 12.11.1
  • npm version: 6.11.3
  • @google-cloud/bigtable version: 3.2.0 and 3.7.0

Steps to reproduce

  1. create a bigtable instance on GCP
  2. create a table
  3. npm install @google-cloud/bigtable
  4. see code below:
const {Bigtable} = require('@google-cloud/bigtable');
const bigtable = new Bigtable({
      project_id: "my_google_project_id",
      keyFilename: "my_bigtable_credential_file",
    });
const instance = bigtable.instance("my_instance_id");
const table = instance.table("my_table");

table.getRows({start: "key1", end: "key2", limit: 1})
    .then((res) => {
      console.log("this is never printed");
    })
    .catch(reason => {
      console.log("not even this one");
    });

RajaOne avatar Oct 05 '21 15:10 RajaOne

This is fixed with "google-gax": "2.28.1". So I added this to my package.json:

{
  "name": "bigtable-test",
  ...
  "dependencies": {
    "@google-cloud/bigtable": "3.2.0",
    ...
    "google-gax": "^2.28.1"
  }
}

RajaOne avatar Nov 15 '21 16:11 RajaOne

I also have the problem about in my project.

Environment details OS: Docker container (node:12.11.1) running on kubernetes engine on GCP and Windows 10 Node.js version: v16.13.1 yarn version: 1.22.17 @google-cloud/bigtable version: 3.9.2

"@google-cloud/bigtable@^3.9.2":
  version "3.9.2"
  resolved "https://registry.npmmirror.com/@google-cloud/bigtable/-/bigtable-3.9.2.tgz#fccb096658e60fa2a7e41d27f9b8d9545989034d"
  dependencies:
    google-gax "^2.29.5"
    ...    

and I try to connect to bigtable.googleapis.com and bigtableadmin.googleapis.com by telnet are a failure. image

does anyone have any idea about this?

xxamxx avatar Feb 15 '22 11:02 xxamxx

I tried this. I get this is never printed on a table with no rows.

danieljbruce avatar Mar 08 '23 19:03 danieljbruce

No longer an issue as reported by the user.

danieljbruce avatar Mar 08 '23 19:03 danieljbruce