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

Datastore: Allow retry and timeout configuration on a per instance level #3

Closed
Subaku opened this issue Jan 14, 2020 · 1 comment · Fixed by #67
Closed

Datastore: Allow retry and timeout configuration on a per instance level #3

Subaku opened this issue Jan 14, 2020 · 1 comment · Fixed by #67
Assignees
Labels
api: datastore Issues related to the googleapis/python-datastore API. type: question Request for information or clarification. Not an issue.

Comments

@Subaku
Copy link

Subaku commented Jan 14, 2020

Seems the configuration for these two items are buried in the code and can't be configured on a per use basis. When debugging connectivity issues the default timeout takes forever and would love to set a shorter timeout on my calls to query.fetch(...) for example.

Or perhaps I've missed something in the docs?

@crwilcox crwilcox transferred this issue from googleapis/google-cloud-python Feb 7, 2020
@crwilcox crwilcox added api: datastore Issues related to the googleapis/python-datastore API. type: question Request for information or clarification. Not an issue. labels Feb 7, 2020
@tseaver tseaver self-assigned this Aug 11, 2020
@tseaver
Copy link
Contributor

tseaver commented Aug 11, 2020

Sketch of implementation:

  • Add retry and timeout args to Batch.commit and plumb through to the underlying RPC in _commit.
  • Add retry and timeout args to Client.get, and plumb through to the underlying RPC.
  • Add retry and timeout args to Client.get_multi, and plumb through to the underlying RPC.
  • Add retry and timeout args to Client.put, and plumb through to the underlying RPC (Batch.commit).
  • Add retry and timeout args to Client.put_multi, and plumb through to the underlying RPC (Batch.commit).
  • Add retry and timeout args to Client.delete, and plumb through to the underlying RPC (Batch.commit).
  • Add retry and timeout args to Client.delete_multi, and plumb through to the underlying RPC (Batch.commit).
  • Add retry and timeout args to Client.allocate_ids, and plumb through to the underlying RPC.
  • Add retry and timeout args to Client.reserve_ids, and plumb through to the underlying RPC.
  • Add retry and timeout args to Transaction.begin, and plumb through to the underlying RPC.
  • Add retry and timeout args to Transaction.rollback, and plumb through to the underlying RPC.
  • Add retry and timeout args to Transaction.commit, and plumb through to the base class method.
  • Add retry and timeout args to query.Iterator ctor, and plumb through to the underlying RPC in _next_page.
  • Add retry and timeout args to Query.fetch, and plumb through to the iterator ctor.

tseaver added a commit that referenced this issue Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/python-datastore API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants