Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigTableInstance.getRows sometimes returns 0 values silently #1757

Closed
arbesfeld opened this issue Oct 29, 2016 · 9 comments
Closed

BigTableInstance.getRows sometimes returns 0 values silently #1757

arbesfeld opened this issue Oct 29, 2016 · 9 comments
Assignees
Labels
api: bigtable Issues related to the Bigtable API.

Comments

@arbesfeld
Copy link
Contributor

arbesfeld commented Oct 29, 2016

I noticed when running getRows that I would sometimes get 0 results. No error was thrown so this took a while to uncover, and eventually I had to do it in batches:

  let rows = [];
  const MAX_KEYS = 1000;

  for (const i = 0; i * MAX_KEYS < rowIds.length; i++) {
    const [newRows] = await eventsTable.getRows({
      decode: false,
      keys: rowIds.slice(i * MAX_KEYS, (i + 1) * MAX_KEYS),
      filter: [{
        column: {
          cellLimit: 1,
        },
      }],
    });

    rows = rows.concat(newRows);
  };

I'm not sure if this is even the right approach, since 1000 seems pretty arbitrary.

Potentially this is related to #1755? However I was only using ~9k keys which where ~100 characters each which should be under the 4mb limit.

@callmehiphop callmehiphop added the api: bigtable Issues related to the Bigtable API. label Oct 31, 2016
@callmehiphop
Copy link
Contributor

So I believe in v1 you weren't allowed to send more than 1mb worth of keys (after serialization). I'm not sure if such a limit exists in v2 however.

/cc @lesv

@stephenplusplus
Copy link
Contributor

@lesv any insight on this one? Thanks!

@stephenplusplus
Copy link
Contributor

@callmehiphop anyone else from Bigtable you can ping for us?

@callmehiphop
Copy link
Contributor

/cc @garye @sduskis

@sduskis
Copy link
Contributor

sduskis commented Nov 16, 2016

I don't know enough about this case to give a clear answer. Is the table populated with data for each of the keys? Has someone tried to reproduce this case? There isn't a known issue for the service failing, but I can to reproduce this with java and see if it succeeds.

@stephenplusplus
Copy link
Contributor

@callmehiphop wdyt?

@callmehiphop
Copy link
Contributor

@arbesfeld are you still seeing this?

@arbesfeld
Copy link
Contributor Author

arbesfeld commented Nov 29, 2016

I'm not sure - I did a workaround by making requests to Bigtable with smaller chunks of keys and that seemed to fix the issue.

@stephenplusplus
Copy link
Contributor

Cool, I think we can close this out. We have a note in our docs advising to chunk up requests as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the Bigtable API.
Projects
None yet
Development

No branches or pull requests

4 participants