apache / apache/beam

[Feature Request]: Python Datastore IO Query Read should retry

Open
#25,454 0 comments 0 reactions 0 assignees View on GitHub
awaiting triage new feature
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What would you like to happen?

As implemented, the Python SDK Datastore IO Query doesn't currently retry on retryable RPC/HTTP errors, in particular, Deadline exceeded.

Per the [Datastore documentation](https://cloud.google.com/datastore/docs/concepts/errors) DEADLINE_EXCEEDED errors should retry using exponential backoff.

https://github.com/apache/beam/blob/v2.44.0/sdks/python/apache_beam/io/gcp/datastore/v1new/datastoreio.py#L304

Writes currently do this at least, but the same applies to reads. https://github.com/apache/beam/blob/v2.44.0/sdks/python/apache_beam/io/gcp/datastore/v1new/datastoreio.py#L397

----

It does occur to me that this would need to be done in a safe enough fashion to not redundantly re-emit already read and processed data. This may complicate the implementation of this resilience improvement.

### Issue Priority

Priority: 3 (nice-to-have improvement)

### Issue Components

- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [X] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.