-
Notifications
You must be signed in to change notification settings - Fork 60
Bigtable this.end() does not stop the stream? #6
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
Comments
From @stephenplusplus on May 2, 2017 16:4 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. |
From @stephenplusplus on May 2, 2017 17:17 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 |
From @arbesfeld on May 3, 2017 18:17 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 |
From @stephenplusplus on May 3, 2017 18:19 Would it be a problem that |
From @arbesfeld on May 3, 2017 20:4 That would be acceptable for our application. We found that |
From @stephenplusplus on May 3, 2017 20:9 Found the issue. PR incoming. |
From @stephenplusplus on May 4, 2017 18:54 PR sent: #2276 |
Fixed data transformation stream to stop processing data on `end` event Still, need to fix GRPC stream closing.
From @arbesfeld on May 2, 2017 14:15
Using Bigtable 0.9.1 - I seem to be getting more than 1 result after calling
this.end()
. Is this expected behavior?Copied from original issue: googleapis/google-cloud-node#2271
The text was updated successfully, but these errors were encountered: