Skip to content
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

Bump spanner stale read from 10 to 15 seconds. #1207

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spanner/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ def read_data(instance_id, database_id):


def read_stale_data(instance_id, database_id):
"""Reads sample data from the database. The data is exactly 10 seconds
"""Reads sample data from the database. The data is exactly 15 seconds
stale."""
import datetime

spanner_client = spanner.Client()
instance = spanner_client.instance(instance_id)
database = instance.database(database_id)
staleness = datetime.timedelta(seconds=10)
staleness = datetime.timedelta(seconds=15)

with database.snapshot(exact_staleness=staleness) as snapshot:
keyset = spanner.KeySet(all_=True)
Expand Down
2 changes: 1 addition & 1 deletion spanner/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_read_stale_data(temporary_database, capsys):
out, _ = capsys.readouterr()

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

Expand Down