ClusterOperation

@Serializable(with = ClusterOperationSerializer::class)
sealed interface ClusterOperation

A change to a collection's shard placement, applied through POST /collections/{name}/cluster.

These move data between peers, so they are asynchronous: the request is accepted and the transfer shows up in CollectionClusterInfo.shardTransfers until it finishes.

Request-only, like Condition: Qdrant never returns one.

Inheritors

Types

Link copied to clipboard
data class AbortTransfer(val shardId: Int, val fromPeerId: Long, val toPeerId: Long) : ClusterOperation

Abort a transfer that is in progress.

Link copied to clipboard
data class DropReplica(val shardId: Int, val peerId: Long) : ClusterOperation

Drop a replica of shardId from peerId.

Link copied to clipboard
data class MoveShard(val shardId: Int, val fromPeerId: Long, val toPeerId: Long) : ClusterOperation

Move a shard to another peer, removing it from the source.

Link copied to clipboard
data class ReplicateShard(val shardId: Int, val fromPeerId: Long, val toPeerId: Long) : ClusterOperation

Copy a shard to another peer, keeping the source: this is how a replica is added.