-
Notifications
You must be signed in to change notification settings - Fork 433
Refactor bigtable::AdminClient and bigtable::DataClient. #170
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
Conversation
|
Ping. |
|
@garye can you take a look? @carterpage got busy (as he should) and can no longer do reviews. |
| channel_.reset(); | ||
| } | ||
|
|
||
| StubPtr Stub() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth talking about the thread safey or lack thereof in these interfaces? Not sure if we do that throughout...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely worth it. This is the only interface so far that may be used in multiple threads. The intention is to make them thread-safe after refactoring.
bigtable/admin/admin_client.cc
Outdated
| ::google::bigtable::admin::v2::BigtableTableAdmin::NewStub(channel); | ||
| channel_ = std::move(channel); | ||
| } | ||
| SimpleAdminClient(std::string project, bigtable::ClientOptions options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Simple AdminClient and Default DataClient? Are they both the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (assuming it compiles and stuff).
There was a certain amount of duplication in these classes. This change fixes that. As a side-effect, it fixes googleapis#107 too. This change does not attempt to *use* both classes the same way, though we should, I do not want to introduce more changes in a PR that basically refactors things.
Use CreateDefault*Client instead of some with Default and some without. Also use Default*Client instead of Simple*Client for one and Default*Client for the other. Thanks to @garye for noticing.
bd069e4 to
234dfdb
Compare
There was a certain amount of duplication in these classes. This
change fixes that. As a side-effect, it fixes #107 too.
This change does not attempt to use both classes the same way,
though we should: I do not want to introduce more changes in a
PR that basically refactors things.