fix(queue): preserve embedding message ids across serialization#1380
Merged
qin-ctx merged 1 commit intovolcengine:mainfrom Apr 13, 2026
Merged
Conversation
EmbeddingMsg instances are registered with RequestWaitTracker before they are written to the embedding queue. The queue serializes messages via dataclasses.asdict(), but id was only assigned in __init__ and was not declared as a dataclass field, so the payload lost the registered root id. When the worker deserialized the message it generated a fresh id and marked the wrong root as complete, allowing wait=True callers to hang until timeout. Declare id as a dataclass field so queue payloads retain the registered id, and add a regression test covering the serialize/dequeue round trip with RequestWaitTracker. Fixes volcengine#1379
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
qin-ctx
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Preserve
EmbeddingMsg.idwhen embedding queue messages are serialized and later deserialized by the worker. Direct embedding waits register this id withRequestWaitTracker; losing it can leavewait=Truerequests pending until timeout even after the embedding job succeeds.Related Issue
Fixes #1379
Type of Change
Changes Made
EmbeddingMsg.idas a dataclass field soasdict()includes it in queued payloads.Testing
Commands run:
Checklist
Screenshots (if applicable)
N/A
Additional Notes
The temporary validation environment was removed after running the tests.