From e359b7d9534893382ab0911c16b28b76aaf14ccd Mon Sep 17 00:00:00 2001 From: root <111755117+qdrant-cloud-bot@users.noreply.github.com> Date: Thu, 11 Jun 2026 08:03:35 +0000 Subject: [PATCH] docs: clarify AvailableNodeIndexes are not contiguous 0..Size-1 Node indexes are allocated monotonically by the operator and never re-compacted, so after repeated scale-up-then-scale-down rounds (on-demand-replication-restart, version upgrades) the indexes - and per-index pod names and PVCs - can grow beyond Spec.Size. Document this as expected behavior and that indexes are reserved-not-reused to avoid colliding with not-yet-reclaimed PVCs/PVs and lingering consensus peers. Consumers must treat the slice as the source of truth and not assume contiguous ordinals. Co-authored-by: Cursor --- api/v1/qdrantcluster_types.go | 8 ++++++++ .../templates/region-crds/qdrant.io_qdrantclusters.yaml | 8 ++++++++ crds/qdrant.io_qdrantclusters.yaml | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/api/v1/qdrantcluster_types.go b/api/v1/qdrantcluster_types.go index 7a0cb41..e515501 100644 --- a/api/v1/qdrantcluster_types.go +++ b/api/v1/qdrantcluster_types.go @@ -994,6 +994,14 @@ type QdrantClusterStatus struct { AvailableNodes int `json:"availableNodes,omitempty"` // AvailableNodeIndexes specifies the indexes of the individual nodes in the cluster // The number of indexes should be equal with the AvailableNodes field. + // NOTE: these indexes are NOT guaranteed to be the contiguous range 0..Size-1. + // New indexes are allocated monotonically (always above the current maximum) and are + // never re-compacted, so after repeated scale-up-then-scale-down rounds (e.g. + // on-demand-replication-restart or version upgrades) the indexes - and the per-index + // pod names and PVCs - can grow well beyond Spec.Size. This is expected behavior: + // indexes are reserved-not-reused to avoid colliding with not-yet-reclaimed PVCs/PVs + // and lingering consensus peers from a prior occupant of the same index. Consumers + // must treat this slice as the source of truth and must not assume contiguous ordinals. // +optional AvailableNodeIndexes []int `json:"availableNodeIndexes,omitempty"` // DeleteInProgessNodeIndexes specifies the indexes of the nodes in the cluster which are in progress of deleting and required to be deleted. diff --git a/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml b/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml index 010f622..693c2b4 100644 --- a/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml +++ b/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml @@ -3455,6 +3455,14 @@ spec: description: |- AvailableNodeIndexes specifies the indexes of the individual nodes in the cluster The number of indexes should be equal with the AvailableNodes field. + NOTE: these indexes are NOT guaranteed to be the contiguous range 0..Size-1. + New indexes are allocated monotonically (always above the current maximum) and are + never re-compacted, so after repeated scale-up-then-scale-down rounds (e.g. + on-demand-replication-restart or version upgrades) the indexes - and the per-index + pod names and PVCs - can grow well beyond Spec.Size. This is expected behavior: + indexes are reserved-not-reused to avoid colliding with not-yet-reclaimed PVCs/PVs + and lingering consensus peers from a prior occupant of the same index. Consumers + must treat this slice as the source of truth and must not assume contiguous ordinals. items: type: integer type: array diff --git a/crds/qdrant.io_qdrantclusters.yaml b/crds/qdrant.io_qdrantclusters.yaml index a1fabf1..daed69f 100644 --- a/crds/qdrant.io_qdrantclusters.yaml +++ b/crds/qdrant.io_qdrantclusters.yaml @@ -3454,6 +3454,14 @@ spec: description: |- AvailableNodeIndexes specifies the indexes of the individual nodes in the cluster The number of indexes should be equal with the AvailableNodes field. + NOTE: these indexes are NOT guaranteed to be the contiguous range 0..Size-1. + New indexes are allocated monotonically (always above the current maximum) and are + never re-compacted, so after repeated scale-up-then-scale-down rounds (e.g. + on-demand-replication-restart or version upgrades) the indexes - and the per-index + pod names and PVCs - can grow well beyond Spec.Size. This is expected behavior: + indexes are reserved-not-reused to avoid colliding with not-yet-reclaimed PVCs/PVs + and lingering consensus peers from a prior occupant of the same index. Consumers + must treat this slice as the source of truth and must not assume contiguous ordinals. items: type: integer type: array