MCPcopy
hub / github.com/grafana/dskit / PendingPartitionIDs

Method PendingPartitionIDs

ring/partition_ring.go:369–380  ·  view source on GitHub ↗

PendingPartitionIDs returns a sorted list of all PENDING partition IDs in the ring. The returned slice is a copy, so the caller can freely manipulate it.

()

Source from the content-addressed store, hash-verified

367// PendingPartitionIDs returns a sorted list of all PENDING partition IDs in the ring.
368// The returned slice is a copy, so the caller can freely manipulate it.
369func (r *PartitionRing) PendingPartitionIDs() []int32 {
370 ids := make([]int32, 0, len(r.desc.Partitions))
371
372 for id, partition := range r.desc.Partitions {
373 if partition.IsPending() {
374 ids = append(ids, id)
375 }
376 }
377
378 slices.Sort(ids)
379 return ids
380}
381
382// ActivePartitionIDs returns a sorted list of all ACTIVE partition IDs in the ring.
383// The returned slice is a copy, so the caller can freely manipulate it.

Calls 1

IsPendingMethod · 0.80