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

Method native_index_repository

libatomic/src/daemon/state.rs:234–246  ·  view source on GitHub ↗

Native-index diagnostics must tolerate incomplete derived schemas and must not trigger automatic migration or recovery. Repair callers first inspect authority read-only, then open writable only if it is repairable.

(&self, readonly: bool)

Source from the content-addressed store, hash-verified

232 /// must not trigger automatic migration or recovery. Repair callers first
233 /// inspect authority read-only, then open writable only if it is repairable.
234 pub(super) fn native_index_repository(&self, readonly: bool) -> Result<Repository, Status> {
235 let result = if readonly {
236 Repository::open_readonly_for_native_repair(&self.root)
237 } else {
238 Repository::open_for_native_repair(&self.root)
239 };
240 result.map_err(|error| {
241 domain_status(
242 ErrorCode::Repository,
243 format!("Native derived indexes are unrepairable: {error}"),
244 )
245 })
246 }
247
248 /// The redb-native change/provenance store (atomic.redb — the merged
249 /// database) for this request — opened by path WITHOUT opening the

Callers 1

repairMethod · 0.80

Calls 1

domain_statusFunction · 0.85

Tested by

no test coverage detected