docs: clarify AvailableNodeIndexes are not contiguous 0..Size-1#281
Merged
Conversation
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 <cursoragent@cursor.com>
syndbg
approved these changes
Jun 11, 2026
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.
Summary
Documents the long-standing (and surprising) behavior that
QdrantClusterStatus.AvailableNodeIndexesis not the contiguous range0..Size-1.The operator allocates node indexes monotonically (always above the current maximum) and never re-compacts. So after repeated scale-up-then-scale-down rounds (e.g. on-demand-replication-restart or version upgrades), the indexes — and therefore the per-index pod names and PVCs (
qdrant-storage-qdrant-<id>-<index>) — grow beyondSpec.Size. A size-N cluster can end up with ordinals like{6,7}, which looks like a leak but is not.This PR clarifies that:
AvailableNodeIndexesis the source of truth and is iterated everywhere instead of assuming0..Size-1.DeleteInProgessNodeIndexesdoes not mean its PVC is gone) and lingering consensus peers mapped to the same internal URL.Comment-only change to
api/v1/qdrantcluster_types.go; CRD YAMLs regenerated viamake manifests.Test plan
make manifestsregenerates cleanly; only the doc comment changed in both CRD YAMLs.