google-cloud-bigtable 2.50.0__tar.gz → 2.50.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_bigtable-2.50.0/google_cloud_bigtable.egg-info → google_cloud_bigtable-2.50.1}/PKG-INFO +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/batcher.py +3 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/client.py +1 -2
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/mutations_batcher.py +23 -11
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_cross_sync/cross_sync.py +37 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/handlers/gcp_exporter.py +78 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/client.py +1 -2
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py +19 -11
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/gapic_version.py +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1/google_cloud_bigtable.egg-info}/PKG-INFO +1 -1
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test_mutations_batcher.py +16 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_cross_sync/test_cross_sync.py +39 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/test_gcp_exporter_handler.py +233 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test_mutations_batcher.py +17 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_batcher.py +40 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_client.py +46 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/LICENSE +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/MANIFEST.in +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/README.rst +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/app_profile.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/backup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/cluster.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/column_family.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/_mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/_read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_async/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_cross_sync/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_cross_sync/_decorators.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_cross_sync/_mapping_meta.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/data_model.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/handlers/_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/handlers/opentelemetry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/metrics_controller.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_metrics/tracked_retry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/_mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/_read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/_swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/_sync_autogen/metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/exceptions.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_async/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_checksum.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_parameters_formatting.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_reader.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/_sync_autogen/execute_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/metadata.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/execute_query/values.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/mutations.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/read_rows_query.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/data/row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/encryption_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/enums.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/error.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/policy.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/row_data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/row_set.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/async_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/async_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/overlay/types/wait_for_consistency_request.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_instance_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/pagers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/services/bigtable_table_admin/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/bigtable_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/bigtable_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/common.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/utils/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_admin_v2/utils/oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/gapic_metadata.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/py.typed +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/grpc.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/grpc_asyncio.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/rest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/services/bigtable/transports/rest_base.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/bigtable.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/feature_flags.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/peer_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/request_stats.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/response_params.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/session.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable_v2/types/types.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google_cloud_bigtable.egg-info/SOURCES.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google_cloud_bigtable.egg-info/dependency_links.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google_cloud_bigtable.egg-info/not-zip-safe +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google_cloud_bigtable.egg-info/requires.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google_cloud_bigtable.egg-info/top_level.txt +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/setup.cfg +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/setup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/admin_overlay/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/admin_overlay/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/admin_overlay/test_system_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/admin_overlay/test_system_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cases/async_to_sync.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cases/cross_sync_files.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cases/rm_aio.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cases/strip_async_conditional_branches.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cases/symbol_replacer.yaml +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/cross_sync/test_cross_sync_e2e.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/data/test_metrics_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/data/test_metrics_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/data/test_system_async.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/data/test_system_autogen.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/utils.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/test_data_api.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/test_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/system/v2_client/test_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/my_oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_admin_packaging.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_async_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_async_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_async_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_consistency.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_oneof_message.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/admin_overlay/test_restore_table.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/conftest.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test__mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_async/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_cross_sync/test_cross_sync_decorators.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/test_data_model.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/test_metrics_controller.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/test_opentelemetry_handler.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_metrics/test_tracked_retry.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test__mutate_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test__read_rows.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test__swappable_channel.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test_client.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test_metrics_interceptor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/_sync_autogen/test_read_rows_acceptance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/_async/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/_async/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/_sync_autogen/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/_sync_autogen/test_query_iterator.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/resources/README.md +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/resources/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/resources/descriptors.pb +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/resources/singer.proto +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/resources/singer_pb2.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/sql_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_byte_cursor.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_checksum.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_execute_query_parameters_parsing.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_metadata.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_query_result_parsing_utils.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/execute_query/test_query_result_row_reader.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test__helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_exceptions.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_helpers.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_mutations.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_read_modify_write_rules.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_read_rows_query.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/data/test_sync_up_to_date.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_admin_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_instance_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_admin_v2/test_bigtable_table_admin.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_admin_v2/test_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_v2/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_v2/test_bigtable.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/gapic/bigtable_v2/test_compat.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/test_packaging.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/test_sql_routing_parameters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/__init__.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/_testing.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/read-rows-acceptance-test.json +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_app_profile.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_backup.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_cluster.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_column_family.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_encryption_info.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_error.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_instance.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_policy.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_row.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_row_data.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_row_filters.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_row_merger.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_row_set.py +0 -0
- {google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/tests/unit/v2_client/test_table.py +0 -0
{google_cloud_bigtable-2.50.0 → google_cloud_bigtable-2.50.1}/google/cloud/bigtable/batcher.py
RENAMED
|
@@ -204,7 +204,10 @@ class MutationsBatcher(object):
|
|
|
204
204
|
* :exc:`~batcher.MutationsBatchError` if there's any error in the mutations.
|
|
205
205
|
"""
|
|
206
206
|
self._close_batcher()
|
|
207
|
+
# Set atexit registration after internal batcher.
|
|
208
|
+
atexit.unregister(self.close)
|
|
207
209
|
self._init_batcher()
|
|
210
|
+
atexit.register(self.close)
|
|
208
211
|
|
|
209
212
|
def __exit__(self, exc_type, exc_value, exc_traceback):
|
|
210
213
|
"""Clean up resources. Flush and shutdown the ThreadPoolExecutor."""
|
|
@@ -416,9 +416,8 @@ class BigtableDataClientAsync(ClientWithProject):
|
|
|
416
416
|
):
|
|
417
417
|
# raise error if not in an event loop in async client
|
|
418
418
|
CrossSync.verify_async_event_loop()
|
|
419
|
-
self._channel_refresh_task = CrossSync.
|
|
419
|
+
self._channel_refresh_task = CrossSync.create_daemon_task(
|
|
420
420
|
self._manage_channel,
|
|
421
|
-
sync_executor=self._executor,
|
|
422
421
|
task_name=f"{self.__class__.__name__} channel refresh",
|
|
423
422
|
)
|
|
424
423
|
|
|
@@ -287,8 +287,8 @@ class MutationsBatcherAsync:
|
|
|
287
287
|
if not CrossSync.is_async
|
|
288
288
|
else None
|
|
289
289
|
)
|
|
290
|
-
self._flush_timer = CrossSync.
|
|
291
|
-
self._timer_routine, flush_interval
|
|
290
|
+
self._flush_timer = CrossSync.create_daemon_task(
|
|
291
|
+
self._timer_routine, flush_interval
|
|
292
292
|
)
|
|
293
293
|
self._flush_jobs: set[CrossSync.Future[None]] = set()
|
|
294
294
|
# MutationExceptionGroup reports number of successful entries along with failures
|
|
@@ -392,18 +392,25 @@ class MutationsBatcherAsync:
|
|
|
392
392
|
CrossSync.Future[list[FailedMutationEntryError]], list[RowMutationEntry]
|
|
393
393
|
]
|
|
394
394
|
] = []
|
|
395
|
+
found_exceptions: list[FailedMutationEntryError] = []
|
|
395
396
|
async for batch, metric in self._flow_control.add_to_flow_with_metrics(
|
|
396
397
|
new_entries, self._target.client._metrics
|
|
397
398
|
):
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
399
|
+
try:
|
|
400
|
+
batch_task = CrossSync.create_task(
|
|
401
|
+
self._execute_mutate_rows,
|
|
402
|
+
batch,
|
|
403
|
+
metric,
|
|
404
|
+
sync_executor=self._sync_rpc_executor,
|
|
405
|
+
)
|
|
406
|
+
in_process_requests.append((batch_task, batch))
|
|
407
|
+
except RuntimeError:
|
|
408
|
+
# Executor is already shut down (e.g. during atexit); flush synchronously.
|
|
409
|
+
found_exceptions.extend(await self._execute_mutate_rows(batch, metric))
|
|
405
410
|
# wait for all inflight requests to complete
|
|
406
|
-
found_exceptions
|
|
411
|
+
found_exceptions.extend(
|
|
412
|
+
await self._wait_for_batch_results(*in_process_requests)
|
|
413
|
+
)
|
|
407
414
|
# update exception data to reflect any new errors
|
|
408
415
|
self._entries_processed_since_last_raise += len(new_entries)
|
|
409
416
|
self._add_exceptions(found_exceptions)
|
|
@@ -545,7 +552,12 @@ class MutationsBatcherAsync:
|
|
|
545
552
|
"""
|
|
546
553
|
self._closed.set()
|
|
547
554
|
self._flush_timer.cancel()
|
|
548
|
-
self.
|
|
555
|
+
entries = self._staged_entries
|
|
556
|
+
try:
|
|
557
|
+
self._schedule_flush()
|
|
558
|
+
except RuntimeError:
|
|
559
|
+
# Executor is already shut down (e.g. during atexit); flush synchronously.
|
|
560
|
+
await self._flush_internal(entries)
|
|
549
561
|
# shut down executors
|
|
550
562
|
if self._sync_flush_executor:
|
|
551
563
|
with self._sync_flush_executor:
|
|
@@ -205,6 +205,19 @@ class CrossSync(metaclass=MappingMeta):
|
|
|
205
205
|
task.set_name(task_name)
|
|
206
206
|
return task
|
|
207
207
|
|
|
208
|
+
@staticmethod
|
|
209
|
+
def create_daemon_task(
|
|
210
|
+
fn: Callable[..., Coroutine[Any, Any, T]],
|
|
211
|
+
*fn_args,
|
|
212
|
+
task_name: str | None = None,
|
|
213
|
+
**fn_kwargs,
|
|
214
|
+
) -> CrossSync.Task[T]:
|
|
215
|
+
"""
|
|
216
|
+
Abstraction over asyncio.create_task for long-lived background tasks.
|
|
217
|
+
Sync version runs on a dedicated daemon thread instead of a ThreadPoolExecutor.
|
|
218
|
+
"""
|
|
219
|
+
return CrossSync.create_task(fn, *fn_args, task_name=task_name, **fn_kwargs)
|
|
220
|
+
|
|
208
221
|
@staticmethod
|
|
209
222
|
async def yield_to_event_loop() -> None:
|
|
210
223
|
"""
|
|
@@ -319,6 +332,30 @@ class CrossSync(metaclass=MappingMeta):
|
|
|
319
332
|
raise ValueError("sync_executor is required for sync version")
|
|
320
333
|
return sync_executor.submit(fn, *fn_args, **fn_kwargs)
|
|
321
334
|
|
|
335
|
+
@staticmethod
|
|
336
|
+
def create_daemon_task(
|
|
337
|
+
fn: Callable[..., T],
|
|
338
|
+
*fn_args,
|
|
339
|
+
task_name: str | None = None,
|
|
340
|
+
**fn_kwargs,
|
|
341
|
+
) -> CrossSync._Sync_Impl.Task[T]:
|
|
342
|
+
"""
|
|
343
|
+
Run a long-lived background task on a dedicated daemon thread and
|
|
344
|
+
return a Future representing its completion.
|
|
345
|
+
"""
|
|
346
|
+
future: concurrent.futures.Future[T] = concurrent.futures.Future()
|
|
347
|
+
|
|
348
|
+
def _run() -> None:
|
|
349
|
+
if not future.set_running_or_notify_cancel(): # pragma: NO COVER
|
|
350
|
+
return
|
|
351
|
+
try:
|
|
352
|
+
future.set_result(fn(*fn_args, **fn_kwargs))
|
|
353
|
+
except BaseException as exc:
|
|
354
|
+
future.set_exception(exc)
|
|
355
|
+
|
|
356
|
+
threading.Thread(target=_run, name=task_name, daemon=True).start()
|
|
357
|
+
return future
|
|
358
|
+
|
|
322
359
|
@staticmethod
|
|
323
360
|
def yield_to_event_loop() -> None:
|
|
324
361
|
"""
|
|
@@ -18,11 +18,13 @@ import logging
|
|
|
18
18
|
import time
|
|
19
19
|
from collections import defaultdict
|
|
20
20
|
|
|
21
|
+
import google.auth.credentials
|
|
21
22
|
from google.api.distribution_pb2 import Distribution
|
|
22
23
|
from google.api.metric_pb2 import Metric as GMetric
|
|
23
24
|
from google.api.metric_pb2 import MetricDescriptor
|
|
24
25
|
from google.api.monitored_resource_pb2 import MonitoredResource
|
|
25
26
|
from google.api_core import gapic_v1
|
|
27
|
+
from google.api_core.exceptions import PermissionDenied, Unauthenticated
|
|
26
28
|
from google.cloud.monitoring_v3 import (
|
|
27
29
|
CreateTimeSeriesRequest,
|
|
28
30
|
MetricServiceClient,
|
|
@@ -115,6 +117,53 @@ def _partition_attributes(
|
|
|
115
117
|
return resource_labels, metric_labels
|
|
116
118
|
|
|
117
119
|
|
|
120
|
+
# scope required to call CreateServiceTimeSeries
|
|
121
|
+
_MONITORING_WRITE_SCOPE = "https://www.googleapis.com/auth/monitoring.write"
|
|
122
|
+
# any one of these scopes is sufficient to write metrics to Cloud Monitoring
|
|
123
|
+
_MONITORING_SCOPES = frozenset(
|
|
124
|
+
{
|
|
125
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
126
|
+
"https://www.googleapis.com/auth/monitoring",
|
|
127
|
+
_MONITORING_WRITE_SCOPE,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def _get_monitoring_credentials(
|
|
133
|
+
credentials: google.auth.credentials.Credentials | None,
|
|
134
|
+
) -> google.auth.credentials.Credentials | None:
|
|
135
|
+
"""
|
|
136
|
+
Return credentials that are able to authenticate against Cloud Monitoring.
|
|
137
|
+
|
|
138
|
+
The metrics exporter shares the credentials of the Bigtable client it belongs to.
|
|
139
|
+
If those credentials are already pinned to a fixed set of scopes that doesn't
|
|
140
|
+
cover Cloud Monitoring (for example, credentials created by the legacy
|
|
141
|
+
``google.cloud.bigtable.Client``, which only requests Bigtable scopes),
|
|
142
|
+
``MetricServiceClient`` can't add its own default scopes to them, and every
|
|
143
|
+
export would be rejected as UNAUTHENTICATED. In that case, a copy of the
|
|
144
|
+
credentials scoped to ``monitoring.write`` is returned instead. The original
|
|
145
|
+
credentials object (and the scopes used for Bigtable traffic) are left untouched.
|
|
146
|
+
|
|
147
|
+
Credentials that don't support scoping (e.g. end-user credentials), or that still
|
|
148
|
+
accept default scopes, are returned unchanged.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
credentials: the credentials used by the Bigtable client, or None to use
|
|
152
|
+
application default credentials
|
|
153
|
+
Returns:
|
|
154
|
+
credentials suitable for the Cloud Monitoring client
|
|
155
|
+
"""
|
|
156
|
+
if credentials is None:
|
|
157
|
+
return None
|
|
158
|
+
if (
|
|
159
|
+
isinstance(credentials, google.auth.credentials.Scoped)
|
|
160
|
+
and not credentials.requires_scopes
|
|
161
|
+
and not _MONITORING_SCOPES.intersection(credentials.scopes or ())
|
|
162
|
+
):
|
|
163
|
+
return credentials.with_scopes([_MONITORING_WRITE_SCOPE])
|
|
164
|
+
return credentials
|
|
165
|
+
|
|
166
|
+
|
|
118
167
|
class GoogleCloudMetricsHandler(OpenTelemetryMetricsHandler):
|
|
119
168
|
"""
|
|
120
169
|
Maintains an internal set of OpenTelemetry metrics for the Bigtable client library,
|
|
@@ -167,8 +216,18 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
167
216
|
|
|
168
217
|
def __init__(self, *client_args, **client_kwargs):
|
|
169
218
|
super().__init__()
|
|
219
|
+
if client_kwargs.get("credentials") is not None:
|
|
220
|
+
# the exporter shares the Bigtable client's credentials. Make sure
|
|
221
|
+
# they are able to authenticate against Cloud Monitoring
|
|
222
|
+
client_kwargs["credentials"] = _get_monitoring_credentials(
|
|
223
|
+
client_kwargs["credentials"]
|
|
224
|
+
)
|
|
170
225
|
self.client = MetricServiceClient(*client_args, **client_kwargs)
|
|
171
226
|
self.prefix = "bigtable.googleapis.com/internal/client"
|
|
227
|
+
# set after a non-retryable authentication/authorization failure.
|
|
228
|
+
# Once disabled, exports are skipped instead of failing (and logging)
|
|
229
|
+
# on every export interval
|
|
230
|
+
self._disabled = False
|
|
172
231
|
|
|
173
232
|
def export(
|
|
174
233
|
self, metrics_data: MetricsData, timeout_millis: float = 10_000, **kwargs
|
|
@@ -177,6 +236,8 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
177
236
|
Write a set of metrics to Cloud Monitoring.
|
|
178
237
|
This method is called by the OpenTelemetry SDK
|
|
179
238
|
"""
|
|
239
|
+
if self._disabled:
|
|
240
|
+
return MetricExportResult.FAILURE
|
|
180
241
|
deadline = time.monotonic() + (timeout_millis / 1000)
|
|
181
242
|
metric_kind = MetricDescriptor.MetricKind.CUMULATIVE
|
|
182
243
|
series_by_project: dict[str, list[TimeSeries]] = defaultdict(list)
|
|
@@ -231,6 +292,23 @@ class BigtableMetricsExporter(MetricExporter):
|
|
|
231
292
|
)
|
|
232
293
|
self._batch_write(project_id, series_list, deadline)
|
|
233
294
|
return MetricExportResult.SUCCESS
|
|
295
|
+
except (Unauthenticated, PermissionDenied) as e:
|
|
296
|
+
# authentication/authorization failures won't resolve on their own.
|
|
297
|
+
# Stop exporting instead of failing again on every export interval
|
|
298
|
+
self._disabled = True
|
|
299
|
+
_LOGGER.warning(
|
|
300
|
+
"Bigtable client-side metrics could not be exported to Cloud "
|
|
301
|
+
"Monitoring for project(s) %s: %s. Client-side metrics are now "
|
|
302
|
+
"disabled for this client; Bigtable data operations are not "
|
|
303
|
+
"affected. To publish client-side metrics, make sure the Cloud "
|
|
304
|
+
"Monitoring API is enabled and the client's credentials are "
|
|
305
|
+
"allowed to write metrics to the project "
|
|
306
|
+
"(e.g. roles/monitoring.metricWriter).",
|
|
307
|
+
", ".join(series_by_project),
|
|
308
|
+
e,
|
|
309
|
+
)
|
|
310
|
+
_LOGGER.debug("Client-side metrics export failure details:", exc_info=True)
|
|
311
|
+
return MetricExportResult.FAILURE
|
|
234
312
|
except Exception as e:
|
|
235
313
|
_LOGGER.warning(
|
|
236
314
|
"Failed to export metrics to Cloud Monitoring: %s", e, exc_info=True
|
|
@@ -306,9 +306,8 @@ class BigtableDataClient(ClientWithProject):
|
|
|
306
306
|
and (not self._disable_background_refresh)
|
|
307
307
|
):
|
|
308
308
|
CrossSync._Sync_Impl.verify_async_event_loop()
|
|
309
|
-
self._channel_refresh_task = CrossSync._Sync_Impl.
|
|
309
|
+
self._channel_refresh_task = CrossSync._Sync_Impl.create_daemon_task(
|
|
310
310
|
self._manage_channel,
|
|
311
|
-
sync_executor=self._executor,
|
|
312
311
|
task_name=f"{self.__class__.__name__} channel refresh",
|
|
313
312
|
)
|
|
314
313
|
|
|
@@ -254,8 +254,8 @@ class MutationsBatcher:
|
|
|
254
254
|
if not CrossSync._Sync_Impl.is_async
|
|
255
255
|
else None
|
|
256
256
|
)
|
|
257
|
-
self._flush_timer = CrossSync._Sync_Impl.
|
|
258
|
-
self._timer_routine, flush_interval
|
|
257
|
+
self._flush_timer = CrossSync._Sync_Impl.create_daemon_task(
|
|
258
|
+
self._timer_routine, flush_interval
|
|
259
259
|
)
|
|
260
260
|
self._flush_jobs: set[CrossSync._Sync_Impl.Future[None]] = set()
|
|
261
261
|
self._entries_processed_since_last_raise: int = 0
|
|
@@ -340,17 +340,21 @@ class MutationsBatcher:
|
|
|
340
340
|
list[RowMutationEntry],
|
|
341
341
|
]
|
|
342
342
|
] = []
|
|
343
|
+
found_exceptions: list[FailedMutationEntryError] = []
|
|
343
344
|
for batch, metric in self._flow_control.add_to_flow_with_metrics(
|
|
344
345
|
new_entries, self._target.client._metrics
|
|
345
346
|
):
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
347
|
+
try:
|
|
348
|
+
batch_task = CrossSync._Sync_Impl.create_task(
|
|
349
|
+
self._execute_mutate_rows,
|
|
350
|
+
batch,
|
|
351
|
+
metric,
|
|
352
|
+
sync_executor=self._sync_rpc_executor,
|
|
353
|
+
)
|
|
354
|
+
in_process_requests.append((batch_task, batch))
|
|
355
|
+
except RuntimeError:
|
|
356
|
+
found_exceptions.extend(self._execute_mutate_rows(batch, metric))
|
|
357
|
+
found_exceptions.extend(self._wait_for_batch_results(*in_process_requests))
|
|
354
358
|
self._entries_processed_since_last_raise += len(new_entries)
|
|
355
359
|
self._add_exceptions(found_exceptions)
|
|
356
360
|
|
|
@@ -462,7 +466,11 @@ class MutationsBatcher:
|
|
|
462
466
|
"""Flush queue and clean up resources"""
|
|
463
467
|
self._closed.set()
|
|
464
468
|
self._flush_timer.cancel()
|
|
465
|
-
self.
|
|
469
|
+
entries = self._staged_entries
|
|
470
|
+
try:
|
|
471
|
+
self._schedule_flush()
|
|
472
|
+
except RuntimeError:
|
|
473
|
+
self._flush_internal(entries)
|
|
466
474
|
if self._sync_flush_executor:
|
|
467
475
|
with self._sync_flush_executor:
|
|
468
476
|
self._sync_flush_executor.shutdown(wait=True)
|
|
@@ -1159,6 +1159,22 @@ class TestMutationsBatcherAsync:
|
|
|
1159
1159
|
assert flush_mock.call_count == 1
|
|
1160
1160
|
assert raise_mock.call_count == 1
|
|
1161
1161
|
|
|
1162
|
+
@CrossSync.pytest
|
|
1163
|
+
async def test_close_executor_shutdown_fallback(self):
|
|
1164
|
+
"""If create_task raises RuntimeError during close (e.g. atexit), flush synchronously"""
|
|
1165
|
+
async with self._make_one() as instance:
|
|
1166
|
+
mutation = self._make_mutation(count=1, size=1)
|
|
1167
|
+
instance._staged_entries = [mutation]
|
|
1168
|
+
with mock.patch.object(
|
|
1169
|
+
CrossSync, "create_task", side_effect=RuntimeError("shutdown")
|
|
1170
|
+
):
|
|
1171
|
+
with mock.patch.object(
|
|
1172
|
+
instance, "_execute_mutate_rows", return_value=[]
|
|
1173
|
+
) as exec_mock:
|
|
1174
|
+
await instance.close()
|
|
1175
|
+
assert exec_mock.call_count == 1
|
|
1176
|
+
assert instance._staged_entries == []
|
|
1177
|
+
|
|
1162
1178
|
@CrossSync.pytest
|
|
1163
1179
|
async def test_close_w_exceptions(self):
|
|
1164
1180
|
"""Raise exceptions on close"""
|
|
@@ -450,6 +450,45 @@ class TestCrossSync:
|
|
|
450
450
|
cs_sync.create_task(lambda: None)
|
|
451
451
|
assert "sync_executor is required" in str(e.value)
|
|
452
452
|
|
|
453
|
+
def test_create_daemon_task(self, cs_sync):
|
|
454
|
+
"""
|
|
455
|
+
create_daemon_task should run on a daemon thread and return a Future
|
|
456
|
+
"""
|
|
457
|
+
result = cs_sync.create_daemon_task(
|
|
458
|
+
lambda x, y: (x + y, threading.current_thread().daemon),
|
|
459
|
+
2,
|
|
460
|
+
y=3,
|
|
461
|
+
task_name="test-daemon",
|
|
462
|
+
)
|
|
463
|
+
assert isinstance(result, cs_sync.Task)
|
|
464
|
+
assert result.result(timeout=5) == (5, True)
|
|
465
|
+
|
|
466
|
+
def test_create_daemon_task_exception(self, cs_sync):
|
|
467
|
+
"""
|
|
468
|
+
create_daemon_task should propagate exceptions onto the returned Future
|
|
469
|
+
"""
|
|
470
|
+
|
|
471
|
+
def fail():
|
|
472
|
+
raise ValueError("boom")
|
|
473
|
+
|
|
474
|
+
result = cs_sync.create_daemon_task(fail)
|
|
475
|
+
with pytest.raises(ValueError, match="boom"):
|
|
476
|
+
result.result(timeout=5)
|
|
477
|
+
|
|
478
|
+
@pytest.mark.asyncio
|
|
479
|
+
async def test_create_daemon_task_async(self, cs_async):
|
|
480
|
+
"""
|
|
481
|
+
Async create_daemon_task should create an asyncio.Task
|
|
482
|
+
"""
|
|
483
|
+
|
|
484
|
+
async def coro_fn(x, y):
|
|
485
|
+
return x + y
|
|
486
|
+
|
|
487
|
+
result = cs_async.create_daemon_task(coro_fn, 2, y=3, task_name="async-daemon")
|
|
488
|
+
assert isinstance(result, asyncio.Task)
|
|
489
|
+
assert result.get_name() == "async-daemon"
|
|
490
|
+
assert await result == 5
|
|
491
|
+
|
|
453
492
|
@pytest.mark.asyncio
|
|
454
493
|
async def test_create_task_async(self, cs_async):
|
|
455
494
|
"""
|