Skip to content

[Misc] Batch: Extend batch session retry handling with capped backoff to support more retry times. - #2658

Open
zhangjyr wants to merge 2 commits into
vllm-project:mainfrom
zhangjyr:feature/extended_session_retrial
Open

[Misc] Batch: Extend batch session retry handling with capped backoff to support more retry times.#2658
zhangjyr wants to merge 2 commits into
vllm-project:mainfrom
zhangjyr:feature/extended_session_retrial

Conversation

@zhangjyr

@zhangjyr zhangjyr commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Description

  • make batch session retry attempts configurable via AIBRIX_BATCH_SESSION_RETRY_ATTEMPTS
  • cap runtime session retry backoff at 60 seconds
  • annotate exhausted session errors with retry and attempt counts
  • add tests for env wiring, capped delays, and exhausted retry behavior

Related Issues

Resolves: #[Insert issue number(s)]

Important: 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

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

…al with 60s

Expose AIBRIX_BATCH_SESSION_RETRY_ATTEMPTS as a environment variable.

Signed-off-by: Jingyuan Zhang <jingyuan.zhang0929@bytedance.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces configurable session retry attempts via environment variables, caps the maximum retry delay at 60 seconds, and appends retry and attempt details to exceptions when session retries are exhausted. The feedback highlights three key areas for improvement: first, updating the custom __deepcopy__ methods of specific exceptions to ensure the appended retry suffix is not lost during deep copies; second, capping the attempt count to prevent potential OverflowError during exponential backoff calculation; and third, mutating the exception in-place before using a bare raise to preserve the original traceback.

Comment thread python/aibrix/aibrix/batch/job_driver/runtime/base.py
Comment thread python/aibrix/aibrix/batch/job_driver/runtime/base.py
Comment thread python/aibrix/aibrix/batch/job_driver/runtime/base.py
Signed-off-by: Jingyuan Zhang <jingyuan.zhang0929@bytedance.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant