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

grpc: listen for metadata event instead of status #1444

Merged
merged 4 commits into from
Jul 22, 2016
Merged

grpc: listen for metadata event instead of status #1444

merged 4 commits into from
Jul 22, 2016

Conversation

callmehiphop
Copy link
Contributor

Closes #1443

This fixes an issue where a grpc readable stream would hang indefinitely because we weren't draining it. Instead of listening for a status event, which occurs after results have been processed, we're now going to listen instead for a metadata event.

@callmehiphop callmehiphop added the api: bigtable Issues related to the Bigtable API. label Jul 21, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 21, 2016
@callmehiphop
Copy link
Contributor Author

@imathews would you mind testing this branch out to see if it resolves your issues?

};

fakeStream
.on('response', function(resp) {

This comment was marked as spam.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling e56bdbf on callmehiphop:bigtable-stream-bug into 5689f96 on GoogleCloudPlatform:master.

@@ -325,7 +325,8 @@ GrpcService.prototype.requestStream = function(protoOpts, reqOpts) {

request: function() {
return service[protoOpts.method](reqOpts, grpcOpts)
.on('status', function(status) {
.on('metadata', function() {
var status = this.received_status || { code: 0 };

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

coveralls commented Jul 21, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling 4032b43 on callmehiphop:bigtable-stream-bug into 5689f96 on GoogleCloudPlatform:master.

.on('status', function(status) {
var grcpStatus = GrpcService.decorateStatus_(status);
.on('metadata', function() {
var grcpStatus = GrpcService.decorateStatus_({ code: 0 });

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

coveralls commented Jul 22, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling d70602e on callmehiphop:bigtable-stream-bug into 5689f96 on GoogleCloudPlatform:master.

@stephenplusplus
Copy link
Contributor

Thanks :D

@stephenplusplus stephenplusplus merged commit 9cdcef5 into googleapis:master Jul 22, 2016
@imathews
Copy link

This is now working beautifully. Many many thanks @callmehiphop for the quick resolution!

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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bigtable table.getRows() silently failing on queries > 4000 cells
6 participants