Skip to content

Commit 9c54bb2

Browse files
SurferJeffAtGoogleJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Bump spanner stale read from 10 to 15 seconds. (#1207)
At the request of the spanner team.
1 parent 2d2ee1c commit 9c54bb2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spanner/cloud-client/snippets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ def read_data(instance_id, database_id):
120120

121121

122122
def read_stale_data(instance_id, database_id):
123-
"""Reads sample data from the database. The data is exactly 10 seconds
123+
"""Reads sample data from the database. The data is exactly 15 seconds
124124
stale."""
125125
import datetime
126126

127127
spanner_client = spanner.Client()
128128
instance = spanner_client.instance(instance_id)
129129
database = instance.database(database_id)
130-
staleness = datetime.timedelta(seconds=10)
130+
staleness = datetime.timedelta(seconds=15)
131131

132132
with database.snapshot(exact_staleness=staleness) as snapshot:
133133
keyset = spanner.KeySet(all_=True)

spanner/cloud-client/snippets_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_read_stale_data(temporary_database, capsys):
7979
out, _ = capsys.readouterr()
8080

8181
# It shouldn't be in the output because it was *just* inserted by the
82-
# temporary database fixture and this sample reads 10 seconds into the
82+
# temporary database fixture and this sample reads 15 seconds into the
8383
# past.
8484
assert 'Total Junk' not in out
8585

0 commit comments

Comments
 (0)