@tikoci/centrs
    Preparing search index...

    Function retryOnCdbConflict

    • Run a CDB mutation; on cdb/conflict, reload and replay it, up to CDB_CONFLICT_MAX_ATTEMPTS attempts in total. The CLI, MCP, and discover --save use this so independent processes all land their changes: writes are serialized by the CDB lock, so every round has a winner and N simultaneous writers need at most N attempts. The replay re-runs normal validation against the fresh snapshot, so cdb/already-exists / cdb/not-found-target stay honest. Direct library callers holding an old snapshot get the cdb/conflict and decide for themselves.

      Type Parameters

      • T

      Parameters

      Returns Promise<T>