Skip to main content

FOREIGN_OWNER_PATIENCE

Constant FOREIGN_OWNER_PATIENCE 

Source
pub const FOREIGN_OWNER_PATIENCE: Duration;
Expand description

How long an owner of another PID namespace counts as alive, measured from when its record was written. A commit or a lock hold lasts seconds to minutes; a crashed foreign owner stops blocking after this long. Three kinds of record are judged by this age. A merge’s intent record (merge_isolation_journal.rs, write_merge_intent, written once and synced per merge) and a claim file (single_owner_claim.rs, write_private, written once) are not rewritten while the owner works, so the age is the owner’s whole hold; the item path of a worktree add is judged by its own modification time (worktree_copy_owner.rs, is_alive), which the add’s work can move, so its age is at most the add’s length. The patience must outlast the longest such hold. Measured: the longest worktree add in the add timing log (48 adds, 2026-11-03T08:55Z to 15:06Z, totalMs) took 539.7 s, and the nearest log of a command that waits, the commit timing log (1,051 commits, 2026-11-02T09:01:37Z to 2026-11-03T15:10:12Z), has a longest of 750.6 s. No log records the length of a merge, which waits up to the 1,800 s live lock wait (wait_limit.rs, DEFAULT_LIVE_WAIT) with its record already written, so an hour is twice the longest wait the code allows and 4.8 times the longest command measured. If that wait is lengthened or removed, this value must be revisited with it. The logs hold commands of the host’s own PID namespace, so no foreign-namespace hold was observed directly. Kept at an hour as the coordinator’s pick under the owner’s delegation, open to the owner’s veto (doc/planning/cli-git-shipped-limits-audit.md, “Foreign-owner patience”).