@sovereignbase/sequencer
    Preparing search index...

    Function compact

    • Removes safely collectable structural garbage from one Replica.

      Soft compaction is the default. It removes only eligible structures that no longer retain consumer content, such as an empty prefix left by a body-before insertion or a Mask whose content was already released by hard deletion. Content retained by soft deletion remains available for recovery.

      Hard compaction additionally removes eligible garbage that still retains consumer content and releases that content. It does not remove visible values or bypass acknowledgement and dependency requirements. Empty structures are not automatically garbage: an anchor still needed by retained dependencies must remain until its structural removal is safe.

      A Mask Realm can be collected only when all participating Actors acknowledge the same complete final frontier. Removing an eligible chain reconnects the surviving causal structure. The application supplies acknowledgements from every required Actor in either mode.

      Type Parameters

      • T

        Consumer-owned value represented by one Frame.

      Parameters

      • frontiers: Acknowledgement[]

        Acknowledgement Frontiers from participating Replicas.

      • state: Replica<T>

        Replica whose eligible retained garbage is collected.

      • hard: boolean = false

        Whether to also discard content-bearing garbage; defaults to soft compaction, which preserves recoverable content.

      Returns void

      Nothing. Released entries are replaced with undefined in-place and the Footage array is never physically compacted.

      Frontier selection uses exact Realm and counter agreement, not a minimum counter. Input acknowledgement arrays are never modified.