Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9c54bb2

Browse filesBrowse files
SurferJeffAtGoogleJon Wayne Parrott
authored andcommitted
Bump spanner stale read from 10 to 15 seconds. (GoogleCloudPlatform#1207)
At the request of the spanner team.
1 parent 2d2ee1c commit 9c54bb2
Copy full SHA for 9c54bb2

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed

‎spanner/cloud-client/snippets.py

Copy file name to clipboardExpand all lines: spanner/cloud-client/snippets.py
+2-2Lines 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

Copy file name to clipboardExpand all lines: spanner/cloud-client/snippets_test.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.