-
Notifications
You must be signed in to change notification settings - Fork 605
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
Bigtable this.end() does not stop the stream? #2271
Comments
I recall seeing this discussed in another issue, and it might be an issue with one of our dependencies. I will look into it. Thanks for reporting. |
The issue I was thinking of doesn't actually relate to the Bigtable API, so throw that theory out the window. I tried to reproduce, but couldn't. My script and results: var bigtable = require('@google-cloud/bigtable')()
bigtable.getInstancesStream()
.on('data', function (instance) {
console.log('instance')
this.end()
})
.on('end', function () {
console.log('over')
})
// output:
instance
over Without the var bigtable = require('@google-cloud/bigtable')()
bigtable.getInstancesStream()
.on('data', function (instance) {
console.log('instance')
})
.on('end', function () {
console.log('over')
})
// output:
instance
instance
instance
over Are you using a different method? Could there be other code interfering with when |
We're using await new Promise((resolve, reject) => {
table
.createReadStream({
decode: true,
start: 'foo',
end: 'bar'
filter: [{
column: {
cellLimit: 1,
},
}],
})
.on('data', function onData(row) {
this.end();
resolve();
})
.on('end', resolve)
.on('error', reject);
}); Other methods could be using |
Would it be a problem that |
That would be acceptable for our application. We found that |
Found the issue. PR incoming. |
PR sent: #2276 |
This issue was moved to googleapis/nodejs-bigtable#6 |
Using Bigtable 0.9.1 - I seem to be getting more than 1 result after calling
this.end()
. Is this expected behavior?The text was updated successfully, but these errors were encountered: