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

Fix bigtable channel refreshing for DataConnection #9712

Closed
dbolduc opened this issue Aug 23, 2022 · 0 comments · Fixed by #9718
Closed

Fix bigtable channel refreshing for DataConnection #9712

dbolduc opened this issue Aug 23, 2022 · 0 comments · Fixed by #9718
Assignees
Labels
api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@dbolduc
Copy link
Member

dbolduc commented Aug 23, 2022

We use a temporary shared_ptr<CompletionQueue> when we create the Stubs.

auto cq_ptr = std::make_shared<CompletionQueue>(cq);

So DataConnection never refreshes its channels. It always backs out, because there are no more references to the CQ:

auto cq = weak_cq.lock();
if (!cq) return;

We can fix the problem by updating the channel refresh API to accept a shared_ptr<internal::CompletionQueueImpl> instead of a shared_ptr<CompletionQueue>. The CQImpl is also owned by the DataConnection's background threads, so it will not go out of scope until the class goes out of scope.

@dbolduc dbolduc added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: bigtable Issues related to the Bigtable API. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 23, 2022
@dbolduc dbolduc self-assigned this Aug 23, 2022
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. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant