[Misc] Batch: Improve batch output persistence resilience during execution and finalization - #2659
Conversation
…LURE_THRESHOLD times. On finalization, fail to read result will be counted as error and included into error file. Signed-off-by: Jingyuan Zhang <jingyuan.zhang0929@bytedance.com>
There was a problem hiding this comment.
Code Review
This pull request introduces robust handling for output persistence failures and finalization rerouting in the batch job driver. Key changes include mechanisms to defer persistence failures using time-bucketed thresholds, reroute unreadable completed output parts into synthesized error files during finalization, and support local fallback part providers in multipart uploads. The reviewer feedback is highly constructive and identifies critical issues: a bug in the serial worker where deferred requests are incorrectly treated as successful completions, a potential resource leak where orphaned staged parts are not aborted during finalization, and a code simplification opportunity using the walrus operator.
Signed-off-by: Jingyuan Zhang <jingyuan.zhang0929@bytedance.com>
Pull Request Description
AIBRIX_BATCH_OUTPUT_PERSISTENCE_FAILURE_THRESHOLDImportant: Before submitting, please complete the description above and review the checklist below.
Contribution Guidelines (Expand for Details)
We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:
Pull Request Title Format
Your PR title should start with one of these prefixes to indicate the nature of the change:
[Bug]: Corrections to existing functionality[CI]: Changes to build process or CI pipeline[Docs]: Updates or additions to documentation[API]: Modifications to aibrix's API or interface[CLI]: Changes or additions to the Command Line Interface[Misc]: For changes not covered above (use sparingly)Note: For changes spanning multiple categories, use multiple prefixes in order of importance.
Submission Checklist
By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.