MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / owner_failpoint

Function owner_failpoint

libatomic/src/daemon/provenance_core.rs:89–104  ·  view source on GitHub ↗

The crash-injection seam, ported VERBATIM from the legacy owner (owner.rs `owner_failpoint`). The env names are load-bearing: the legacy test suite spawns owners (now daemons) with them and asserts the process aborts and the retry converges.

(name: &str)

Source from the content-addressed store, hash-verified

87/// legacy test suite spawns owners (now daemons) with them and asserts
88/// the process aborts and the retry converges.
89pub fn owner_failpoint(name: &str) {
90 if std::env::var("ATOMIC_OWNER_FAILPOINT").ok().as_deref() != Some(name) {
91 return;
92 }
93 let should_trip = match std::env::var_os("ATOMIC_OWNER_FAILPOINT_MARKER") {
94 Some(path) => OpenOptions::new()
95 .create_new(true)
96 .write(true)
97 .open(path)
98 .is_ok(),
99 None => true,
100 };
101 if should_trip {
102 std::process::abort();
103 }
104}
105
106/// Reserve or retrieve the stable identity for a session turn. The first
107/// reserve claims the turn; a committed reservation returns only after the

Callers 4

append_envelopesFunction · 0.85
prepare_checkpointFunction · 0.85
load_frozen_pageFunction · 0.85
bind_checkpoint_hashFunction · 0.85

Calls 3

okMethod · 0.45
openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected