Repository navigation
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 69419cc. Configure here.
There was a problem hiding this comment.
I noticed one related retry path outside the files changed in this PR that might also be worth covering.
In python/ray/data/_internal/datasource_v2/formats/text/text_reader.py, TextReader.read() uses the shared iterate_with_retry() helper but doesn't pass max_attempts, so it continues to use the default of 10 attempts regardless of the new DataContext.io_retry_max_attempts setting.
I verified this with a small regression test using io_retry_max_attempts=1 and 3. Both cases failed with assert 10 == 1 and assert 10 == 3, respectively. After adding max_attempts=ctx.io_retry_max_attempts to the call, both tests passed.
Since this PR introduces configurable retry budgets for file IO, would it make sense to cover this path as well, or is the TextReader retry path intentionally outside the scope of this change? Not a blocker by the way. If this is intentionally outside the scope of this PR, perhaps it could be tracked in a follow-up issue to ensure consistent retry budget behavior across the other file readers as well.
0210d2a to
a4aa772
Compare
a4aa772 to
37f50bb
Compare
@Yin-1022 Thanks for catching this, has fixed |
Add DataContext.io_retry_max_attempts and environment defaults for shared file IO retry attempts and error patterns. The default budget remains 10 total attempts. Retry transient S3 HTTP 429 responses by default. File reads, writes, schema inference, and checkpoint IO now use the configured budget. Parquet V2 forwards captured retry configuration to FooterReader actors. Zarr captures its budget when creating read tasks, including when an explicit context differs from the current context. Keep the deprecated write_file_retry_on_errors configuration unchanged. Document the new budget and cover environment parsing, retry counts, configuration propagation, S3 error matching, and Zarr context capture. Full Ray integration tests have not run: the workspace lacks the source ray._raylet extension. Source-isolated regression checks were run. Signed-off-by: dragongu <[email protected]>
Add ray._common.utils.env_tuple() alongside env_bool/env_integer/env_float and use it for RAY_DATA_RETRIED_IO_ERRORS instead of the local _env_retry_errors helper. Consolidate the retry configuration tests: cover attempts and error patterns for the default and set cases, keep the end-to-end error tests, and use DataContext.get_current() rather than comparing global and local contexts in the Zarr test. Signed-off-by: dragongu <[email protected]>
37f50bb to
3b826f0
Compare
The local-variable binding only silenced the local pre-commit pyrefly hook, which runs without pyarrow installed. CI type-checks with pyarrow and passes on the original code. Signed-off-by: dragongu <[email protected]>

Description
Make shared file IO retry attempts configurable through
DataContextand environment defaults, so applications can tune retry budgets for their storage backend. Explicitly propagate footer retry configuration to Parquet V2 actors.Before
Shared file and Parquet retry wrappers used fixed budgets of 10 attempts.
retried_io_errorswas configurable throughDataContext, but its default had no environment override. FooterReader actors used default error patterns rather than the configuration captured for the read.After
DataContext.io_retry_max_attempts, defaulting toRAY_DATA_IO_RETRY_MAX_ATTEMPTSor 10. Attempts include the initial try.RAY_DATA_RETRIED_IO_ERRORS. The deprecated write-only defaults have a separateRAY_DATA_WRITE_FILE_RETRY_ON_ERRORSoverride. Empty arrays are preserved, and existing default patterns, including the S3 HeadBucket pattern, are unchanged.Subsystems: API (DataContext configuration); IO (datasource/datasink retry behavior).