The redb-native change/provenance store (atomic.redb — the merged database) for this request — opened by path WITHOUT opening the repository handle. redb refuses a second concurrent handle on the same file, so the journal-port handlers open, use, and drop this sequentially under the gate (the same open/close-per-op discipline #230's orchestrator applies).
(&self)
| 252 | /// sequentially under the gate (the same open/close-per-op discipline |
| 253 | /// #230's orchestrator applies). |
| 254 | pub fn change_store(&self) -> Result<RedbChangeStore, Status> { |
| 255 | let dot_dir = Repository::canonical_dot_dir(&self.root).map_err(repository_error)?; |
| 256 | let path = atomic_repository::ensure_database(&dot_dir) |
| 257 | .map_err(|error| domain_status(ErrorCode::Repository, error.to_string()))?; |
| 258 | RedbChangeStore::open_existing_wait(&path, database_open_wait()).map_err(|error| { |
| 259 | domain_status( |
| 260 | ErrorCode::ProvenanceStore, |
| 261 | format!("failed to open {}: {error}", path.display()), |
| 262 | ) |
| 263 | }) |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | /// Shared adapter for service paths that already own a repository handle. |
no test coverage detected