From dc415a8387000a219b90e40b2083b9b3911b2930 Mon Sep 17 00:00:00 2001 From: Duda Nogueira Date: Wed, 9 Sep 2026 18:37:19 -0300 Subject: [PATCH] fix(cluster): read the vector queue length the server actually sends 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) Claude-Session: https://claude.ai/code/session_01HNeKV7TAYZGDyT9agqJwUf --- .../client6/v1/api/cluster/Shard.java | 2 +- .../client6/v1/internal/json/JSONTest.java | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/weaviate/client6/v1/api/cluster/Shard.java b/src/main/java/io/weaviate/client6/v1/api/cluster/Shard.java index e5625a831..cbe93ed14 100644 --- a/src/main/java/io/weaviate/client6/v1/api/cluster/Shard.java +++ b/src/main/java/io/weaviate/client6/v1/api/cluster/Shard.java @@ -7,7 +7,7 @@ public record Shard( @SerializedName("class") String collection, @SerializedName("objectCount") int objectCount, @SerializedName("vectorIndexingStatus") VectorIndexingStatus vectorIndexingStatus, - @SerializedName("vectorQueueLenght") int vectorQueueLenght, + @SerializedName("vectorQueueLength") int vectorQueueLength, @SerializedName("compressed") boolean compressed, @SerializedName("loaded") boolean loaded, @SerializedName("numberOfReplicas") int numberOfReplicas, diff --git a/src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java b/src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java index e7c0d6203..a88c69054 100644 --- a/src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java +++ b/src/test/java/io/weaviate/client6/v1/internal/json/JSONTest.java @@ -15,6 +15,8 @@ import com.jparams.junit4.data.DataMethod; import io.weaviate.client6.v1.api.cluster.NodeVerbosity; +import io.weaviate.client6.v1.api.cluster.Shard; +import io.weaviate.client6.v1.api.cluster.VectorIndexingStatus; import io.weaviate.client6.v1.api.collections.CollectionConfig; import io.weaviate.client6.v1.api.collections.Encoding; import io.weaviate.client6.v1.api.collections.Generative; @@ -2269,6 +2271,24 @@ public static Object[][] testCases() { } """ }, + // Shard: the server's key is "vectorQueueLength" -- see #619 + { + Shard.class, + new Shard("s1", "Things", 7, VectorIndexingStatus.INDEXING, 42, false, true, 1, 1), + """ + { + "name": "s1", + "class": "Things", + "objectCount": 7, + "vectorIndexingStatus": "INDEXING", + "vectorQueueLength": 42, + "compressed": false, + "loaded": true, + "numberOfReplicas": 1, + "replicationFactor": 1 + } + """ + }, }; }