Skip to content

Commit

Permalink
fix: respect deadlines for column family operations (#687)
Browse files Browse the repository at this point in the history
* feat: allow end users to override the deadline for manipulating column families

As a sideeffect this also fixes a bug where the default deadlines were not applied.

* limit scope of change to just use the default timeout

* lint
  • Loading branch information
igorbernstein2 committed Oct 20, 2022
1 parent 0841824 commit df2e64a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions google/cloud/bigtable/column_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from google.cloud.bigtable_admin_v2.types import (
bigtable_table_admin as table_admin_v2_pb2,
)
from google.api_core.gapic_v1.method import DEFAULT


class GarbageCollectionRule(object):
Expand Down Expand Up @@ -275,7 +276,8 @@ def create(self):
# data it contains are the GC rule and the column family ID already
# stored on this instance.
client.table_admin_client.modify_column_families(
request={"name": self._table.name, "modifications": [modification]}
request={"name": self._table.name, "modifications": [modification]},
timeout=DEFAULT,
)

def update(self):
Expand All @@ -302,7 +304,8 @@ def update(self):
# data it contains are the GC rule and the column family ID already
# stored on this instance.
client.table_admin_client.modify_column_families(
request={"name": self._table.name, "modifications": [modification]}
request={"name": self._table.name, "modifications": [modification]},
timeout=DEFAULT,
)

def delete(self):
Expand All @@ -324,7 +327,8 @@ def delete(self):
# data it contains are the GC rule and the column family ID already
# stored on this instance.
client.table_admin_client.modify_column_families(
request={"name": self._table.name, "modifications": [modification]}
request={"name": self._table.name, "modifications": [modification]},
timeout=DEFAULT,
)


Expand Down

0 comments on commit df2e64a

Please sign in to comment.