Fix bigtable channel refreshing for DataConnection
#9712
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.
We use a temporary
shared_ptr<CompletionQueue>
when we create the Stubs.google-cloud-cpp/google/cloud/bigtable/internal/bigtable_stub_factory.cc
Line 60 in 18937be
So
DataConnection
never refreshes its channels. It always backs out, because there are no more references to the CQ:google-cloud-cpp/google/cloud/bigtable/internal/connection_refresh_state.cc
Lines 74 to 75 in 18937be
We can fix the problem by updating the channel refresh API to accept a
shared_ptr<internal::CompletionQueueImpl>
instead of ashared_ptr<CompletionQueue>
. The CQImpl is also owned by theDataConnection
's background threads, so it will not go out of scope until the class goes out of scope.The text was updated successfully, but these errors were encountered: