fix(cluster): read the vector queue length the server actually sends - #620
Open
dudanogueira wants to merge 1 commit into
Open
fix(cluster): read the vector queue length the server actually sends#620dudanogueira wants to merge 1 commit into
dudanogueira wants to merge 1 commit into
Conversation
Shard declared the field as "vectorQueueLenght" -- Lenght for Length -- in both the @SerializedName and the record component. The server sends vectorQueueLength (entities/models/node_shard_status.go:61), so the field never bound and the value was always 0, on every server version, with nothing thrown and nothing logged. Confirmed against a live 1.39.0: GET /v1/nodes?output=verbose returns a shard object carrying vectorQueueLength and no vectorQueueLenght. No @SerializedName(alternate = ...): unlike #607, nothing was ever validly stored or sent under the misspelling, so there is no old spelling to stay compatible with. Closes #619 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNeKV7TAYZGDyT9agqJwUf
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
This was referenced Sep 9, 2026
Collaborator
|
Please remove all comments from this PR and trim the PR description to what is strictly relevant. |
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.
Motivation
Shardasks Gson forvectorQueueLenght—LenghtforLength— in both the@SerializedNameand the record component. The server sendsvectorQueueLength:so the field never binds and the value is always
0, on every server version. Nothing throws and nothing is logged. It matters precisely when it is interesting: the queue is only non-zero while async indexing is catching up, which is exactly when the client reports zero.Confirmed against a live Weaviate 1.39.0 —
GET /v1/nodes?output=verbose:Approach
Rename the JSON key and the record component to
vectorQueueLength.No
@SerializedName(alternate = "vectorQueueLenght"), deliberately, and the reasoning is the one from #612 rather than #610: analternateearns its place when data was stored under the old spelling and has to keep loading. Nothing ever wrote this key — the server has always sentvectorQueueLength— so an alternate would only preserve a spelling that never appeared on the wire.Key areas for review
Shardis read-only in practice (it is only ever deserialized fromGET /nodes), so the component rename is the whole change. Worth confirming you agree it is not worth analternate.objectCount/numberOfReplicas/replicationFactor/vectorQueueLengthareint64server-side andinthere, and the server'sasyncReplicationStatushas no component althoughAsyncReplicationStatus.javaexists and is unreferenced. Happy to file either as its own ticket if you class them as bugs.Testing
Unit — one round-trip row in
JSONTest.testCases()covering a shard with a non-zero queue, which exercises bothtest_serializeandtest_deserialize.Verified the test fails without the fix, in both directions:
No integration test:
Shard.vectorQueueLengthis only non-zero mid-indexing, so an assertion on it against a container would be inherently racy. The wire key is what was wrong, and the round-trip row pins that deterministically.Locally green: 384 unit tests.
Breaking changes
Shard's canonical constructor and its accessor change name —vectorQueueLenghtbecomesvectorQueueLength. Anything callingshard.vectorQueueLenght(), constructingShardpositionally by name, or destructuring it in a record pattern needs the new spelling. Since the old accessor could only ever return0, any caller reading it was reading a constant.Closes #619
🤖 Generated with Claude Code
https://claude.ai/code/session_01HNeKV7TAYZGDyT9agqJwUf