Skip to content

fix(cluster): read the vector queue length the server actually sends - #620

Open
dudanogueira wants to merge 2 commits into
mainfrom
fix/shard-vector-queue-length
Open

dudanogueira wants to merge 2 commits into
mainfrom
fix/shard-vector-queue-length

Conversation

@dudanogueira

@dudanogueira dudanogueira commented Sep 9, 2026 •

Copy link
Copy Markdown

Problem

Shard reads the JSON key vectorQueueLenght, but the server sends vectorQueueLength. The field never binds, so GET /nodes?output=verbose always reports a vector queue length of 0.

Fix

  • Rename the @SerializedName and the record component to vectorQueueLength.
  • Add a JSONTest round-trip row with a non-zero queue length.

Breaking changes

The Shard accessor vectorQueueLenght() is renamed to vectorQueueLength(). The old accessor could only ever return 0.

Closes #619

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

@orca-security-eu orca-security-eu Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@bevzzz

bevzzz commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Please remove all comments from this PR and trim the PR description to what is strictly relevant.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The shard queue-length mapping change has no active review issues.

No open issues 🎉

What changed in this PR

Fixes #619 by aligning the cluster Shard model with the server’s vectorQueueLength JSON field, allowing non-zero queue lengths to deserialize correctly.

Changes:

  • Corrects the JSON mapping and renames the public accessor from vectorQueueLenght() to vectorQueueLength(), a breaking API change.
  • Adds a JSON round-trip test with a queue length of 42.
File Description
src/​test/​java/​io/​weaviate/​client6/​v1/​internal/​json/​JSONTest.java Adds a non-zero shard queue-length regression case.
src/​main/​java/​io/​weaviate/​client6/​v1/​api/​cluster/​Shard.java Corrects the serialized field name and record component spelling.

Review effort: Balanced

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.

v6: Shard.vectorQueueLenght is misspelled, so the vector queue length is always 0

3 participants