Skip to content

validateRowInProgress throws TransformError with decode: false #394

@rochoa

Description

@rochoa

Environment details

  • OS: macOS Sierra 10.12.6
  • Node.js version: v8.14.0
  • npm version: 6.4.1
  • @google-cloud/bigtable version: 1.0.0

Steps to reproduce

  1. Have a table with multiple cells in the same row
  2. Use table.createReadStream with decode=false option.
  3. You get a TransformError: A commit is required between row keys (...).

Example:

const options = {
    prefix: 'test',
    filter: [
        {
            column: ['a', 'b']
        },
        {
            column: {
                cellLimit: 1
            }
        }
    ],
    decode: false
}

table.createReadStream(options)
    .on('error', err => {
        console.error(err);
    })
    .on('data', row => {
        console.log(row.id.toString(), row.data)
    })
    .on('end', () => {
        console.log('end');
    });

As the key is not being decoded, it will compare two different buffer instances and it will throw at:

if (
newRowKey &&
chunk.rowKey &&
newRowKey.length !== 0 &&
newRowKey !== row.key
) {
this.destroy(
new TransformError({
message: 'A commit is required between row keys',
chunk,
})
);
return;
}

Metadata

Metadata

Labels

🚨This issue needs some love.api: bigtableIssues related to the googleapis/nodejs-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

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions