-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow specifying read consistency #4343
Allow specifying read consistency #4343
Conversation
a79426d
to
b1258fe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
…On Mon, Nov 6, 2017, 6:21 AM Luke Sneeringer ***@***.***> wrote:
***@***.**** approved this pull request.
This looks sane to me. Please get *either* @tseaver
<https://github.com/tseaver> or @dhermes <https://github.com/dhermes> to
also say yes before merging.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4343 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADzDDExUi_PSKcCKImv96T9FRvw-5GIDks5szxX0gaJpZM4QRyrZ>
.
|
@chemelnucfin Please put the "Closes #4340" in the description, not the title. E.g., for a single-commit PR: $ git commit datastore/ -m "Specify read consistency.
Closes #4340." |
Also, please add labels when you create the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests for get_read_options
need to move from test_client.py
to test_helpers.py
.
_determine_default_project as _base_default_project) | ||
from google.cloud._helpers import (_determine_default_project as | ||
_default_project) | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
from google.cloud.datastore.batch import Batch | ||
from google.cloud.datastore.entity import Entity | ||
from google.cloud.datastore.key import Key | ||
from google.cloud.datastore.query import Query | ||
from google.cloud.datastore.transaction import Transaction | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -74,7 +75,7 @@ def _determine_default_project(project=None): | |||
project = _get_gcd_project() | |||
|
|||
if project is None: | |||
project = _base_default_project(project=project) | |||
project = _default_project(project=project) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -302,15 +304,27 @@ def get(self, key, missing=None, deferred=None, transaction=None): | |||
:param transaction: (Optional) Transaction to use for read consistency. | |||
If not passed, uses current transaction, if set. | |||
|
|||
:type eventual: bool | |||
:param eventual: (Optional) Defaults to strongly consistent (False). | |||
Setting True will use eventual consistency, |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -350,7 +371,8 @@ def get_multi(self, keys, missing=None, deferred=None, transaction=None): | |||
entity_pbs = _extended_lookup( | |||
datastore_api=self._datastore_api, | |||
project=self.project, | |||
key_pbs=[k.to_protobuf() for k in keys], | |||
key_pbs=[key.to_protobuf() for key in keys], |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
from google.cloud.datastore.entity import Entity | ||
from google.cloud.datastore.key import Key | ||
from google.cloud.proto.datastore.v1 import entity_pb2 as _entity_pb2 | ||
from google.cloud.proto.datastore.v1 import datastore_pb2 as _datastore_pb2 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@chemelnucfin Rather than merging master into your branch (which is what confused the @goolebot) we prefer to rebase the branch against master, which keeps the PR focused on just the relevant changes. |
0d45147
to
9605172
Compare
Sorry about that. I think I rebased on the wrong branch. I think that's better now. |
664e5cc
to
d09d907
Compare
from google.cloud._helpers import ( | ||
_determine_default_project as _base_default_project) | ||
from google.cloud._helpers import (_determine_default_project as | ||
_base_default_project) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
from google.cloud.datastore.entity import Entity | ||
from google.cloud.datastore.key import Key | ||
|
||
from google.protobuf import struct_pb2 | ||
from google.type import latlng_pb2 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Closes #4340