Skip to content

fix: clean worker indexes on re-registration - #289

Open
DatenpflegeNordHL wants to merge 1 commit into
vllm-project:mainfrom
DatenpflegeNordHL:fix/worker-registry-reregistration
Open

DatenpflegeNordHL wants to merge 1 commit into
vllm-project:mainfrom
DatenpflegeNordHL:fix/worker-registry-reregistration

Conversation

@DatenpflegeNordHL

Copy link
Copy Markdown

Summary

  • clean the previous worker's secondary indexes before replacing a worker registered with the same URL
  • preserve the existing worker ID while rebuilding model, type, and connection indexes
  • serialize registry mutations so cleanup and re-registration cannot interleave
  • add regression coverage for stale and duplicate secondary-index entries

Testing

  • "cargo test --lib core::worker_registry::tests::test_reregister_worker_cleans_secondary_indexes -- --exact"
  • "cargo test --lib core::worker_registry::tests"
  • "cargo fmt --check"
  • "cargo clippy --all-targets --all-features -- -D warnings"
  • "cargo test --lib"

Fixes #255

Signed-off-by: DatenpflegeNordHL <kontakt@datenpflege-nord.de>

@hsliuustc0106 hsliuustc0106 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 64caf081. Correct fix: previously, re-registering a worker by URL (e.g. after a model/type/label change) left stale entries in type_workers, connection_workers, and the model indexes. register() now purges all secondary indexes via remove_inner while preserving the WorkerId, and the new mutation_lock serializes the multi-map mutations (no lock nesting — public remove/remove_by_url route through the same inner path). The test covering label change + type change + removal is thorough. No findings.


From an automated daily review pass over new/updated PRs (head SHA frozen at 64caf081).

@hsliuustc0106 hsliuustc0106 added the bug Something isn't working label Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: re-registering a worker URL leaves stale registry indexes

2 participants