Merge

Compact a collection

/ Compact, / Collection, / Merge

Compact a collection #

Queue one manual compaction (merge) pass on every started primary copy of the collection, cluster-wide. Useful when you want to reclaim disk space or reduce the segment count on demand, without waiting for the background compaction cadence.

The API is asynchronous: it fans out to at most one request per node hosting a started primary, and each node queues its own batch compaction job (one job per node, mutual exclusion — HTTP 409 from that node’s row while one runs). The request returns as soon as the jobs are queued; a pass can run for minutes, so nothing waits for the merges. Per-shard job state and live merge progress (phase, per-mille) are observable in each node’s task view, and a job is cancellable there too. A node-level failure fails that node’s row, not the whole request.

...