Skip to content

Fix tokenizer state cleanup on dispatch failure - #28694

Merged
merrymercy merged 2 commits into
mainfrom
lmzheng/fix-tokenizer-rid-cleanup
Jun 20, 2026
Merged

merrymercy merged 2 commits into
mainfrom
lmzheng/fix-tokenizer-rid-cleanup

Conversation

@merrymercy

@merrymercy merrymercy commented Jun 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Clean up pending rid_to_state entries if request handling fails after request state initialization.
  • Add regression coverage for single and batch dispatch failures.

Test plan

  • PYTHONPATH=python .venv/bin/python -m pytest test/registered/unit/managers/test_tokenizer_manager_rid_cleanup.py -q
  • with-proxy .venv/bin/python -m pre_commit run --files python/sglang/srt/managers/tokenizer_manager.py test/registered/unit/managers/test_tokenizer_manager_rid_cleanup.py

Original commits

  • 68cd12f59

CI States

Latest PR Test (Base): ✅ Run #27850805498
Latest PR Test (Extra): ❌ Run #27850805392

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@merrymercy

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Jun 19, 2026
@merrymercy
merrymercy force-pushed the lmzheng/fix-tokenizer-rid-cleanup branch from 952f99c to 8a960f6 Compare June 19, 2026 01:05
merrymercy and others added 2 commits June 19, 2026 15:13
Clean up request state entries when request dispatch fails after state initialization but before scheduler submission. This prevents rejected requests from leaving stale request IDs behind.

Co-authored-by: Yinghai Lu <[email protected]>
@merrymercy
merrymercy force-pushed the lmzheng/fix-tokenizer-rid-cleanup branch from 38316a2 to c6ccc20 Compare June 19, 2026 22:14
@merrymercy
merrymercy merged commit 45d203f into main Jun 20, 2026
156 of 172 checks passed
@merrymercy
merrymercy deleted the lmzheng/fix-tokenizer-rid-cleanup branch June 20, 2026 04:55
whybeyoung pushed a commit to whybeyoung/sglang that referenced this pull request Jun 22, 2026
Chronostasys pushed a commit to MindLab-Research/sglang that referenced this pull request Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant