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)
| 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 |