-
Notifications
You must be signed in to change notification settings - Fork 455
cleanup(bigtable)!: remove experimental InstanceChannelAffinityOption #16213
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_DATA_CONNECTION_IMPL_H | ||
|
|
||
| #include "google/cloud/bigtable/data_connection.h" | ||
| #include "google/cloud/bigtable/instance_resource.h" | ||
| #include "google/cloud/bigtable/internal/bigtable_stub.h" | ||
| #include "google/cloud/bigtable/internal/mutate_rows_limiter.h" | ||
| #include "google/cloud/bigtable/internal/operation_context_factory.h" | ||
|
|
@@ -28,12 +29,19 @@ | |
| #include "google/cloud/status_or.h" | ||
| #include "google/cloud/version.h" | ||
| #include <memory> | ||
| #include <vector> | ||
|
|
||
| namespace google { | ||
| namespace cloud { | ||
| namespace bigtable_internal { | ||
| GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN | ||
|
|
||
| // TODO(#16216): Remove this option in favor of addind a member variable to | ||
| // store the instances. | ||
| struct InstanceChannelAffinityOption { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comment: internal options are a code smell. I am guessing we moved the option to internal to keep the refactor small. In the long run, it seems ideal for the concrete
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Created #16216 to track. |
||
| using Type = std::vector<bigtable::InstanceResource>; | ||
| }; | ||
|
|
||
| bigtable::Row TransformReadModifyWriteRowResponse( | ||
| google::bigtable::v2::ReadModifyWriteRowResponse response); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ | |
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #include "google/cloud/internal/disable_deprecation_warnings.inc" | ||
| #include "google/cloud/bigtable/testing/table_integration_test.h" | ||
| #include "google/cloud/bigtable/resource_names.h" | ||
| #include "google/cloud/bigtable/testing/random_names.h" | ||
|
|
@@ -126,11 +127,12 @@ void TableIntegrationTest::SetUp() { | |
| if (google::cloud::internal::GetEnv( | ||
| "GOOGLE_CLOUD_CPP_BIGTABLE_TESTING_CHANNEL_POOL") | ||
| .value_or("") == "dynamic") { | ||
| options.set<experimental::InstanceChannelAffinityOption>({}); | ||
| data_connection_ = MakeDataConnection( | ||
| {InstanceResource(Project(project_id()), instance_id())}, | ||
| std::move(options)); | ||
| } else { | ||
| data_connection_ = MakeDataConnection(std::move(options)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isn't this deprecated? Also, Maybe like: auto instances = std::vector<InstanceResource>{};
if (GetEnv("GOOGLE_CLOUD_CPP_BIGTABLE_TESTING_CHANNEL_POOL")
.value_or("") == "dynamic") {
instances.push_back(InstanceResource(Project(project_id()), instance_id()));
}
data_connection_ = MakeDataConnection(std::move(instances));Q: is there a downside to always supplying the InstanceResource, even when not using the dynamic channel pool? Then it is just: data_connection_ = MakeDataConnection(
{InstanceResource(Project(project_id()), instance_id())});
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using the deprecated overload results in a single, static, round-robin channel pool. Using the new overload always uses DynamicChannelPools. Using the deprecated method allows continued testing of the old channel pool. |
||
| } | ||
| data_connection_ = MakeDataConnection( | ||
| {InstanceResource(Project(project_id()), instance_id())}, | ||
| std::move(options)); | ||
|
|
||
| // In production, we cannot use `DropAllRows()` to cleanup the table because | ||
| // the integration tests sometimes consume all the 'DropRowRangeGroup' quota. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.