pub const CLAIM_ATTEMPTS: usize = 8;Available on crate feature
serve and (crate features serve-history-postgres or serve-history-sqlite) only.Expand description
Bounded retry count for the atomic idempotency claim (handles a claim being purged concurrently between the insert attempt and the read-back) and for the read-max-then-insert paths (template versions, launch-log seqs).
Sized for contention, not just for a lost race. SQLite serializes writers
and answers a write-write overlap on a deferred transaction with database is locked immediately (waiting would deadlock), so busy_timeout does not
help there and the attempt budget is the only thing standing between a
concurrent writer and a surfaced error. With N concurrent writers each needing
its own turn, a budget of 4 is thinner than it looks: six writers on a loaded
machine exhausted it and failed a register (#457 CI).