Acquire a read-only repository for a CLI query, allowing short-lived writers (such as Stop checkpoint publication) to finish first. Only typed database contention is retried, for at most ten seconds; all other errors propagate immediately. Callers must not already hold a writable repository handle. Keep this policy at the CLI boundary: library callers may require immediate failure or supply their
(
path: impl AsRef<Path>,
)
| 366 | /// Keep this policy at the CLI boundary: library callers may require immediate |
| 367 | /// failure or supply their own deadline to `Repository::open_readonly_wait`. |
| 368 | pub(crate) fn open_readonly_repository( |
| 369 | path: impl AsRef<Path>, |
| 370 | ) -> Result<Repository, atomic_repository::RepositoryError> { |
| 371 | Repository::open_readonly_wait(path, std::time::Duration::from_secs(10)) |
| 372 | } |
| 373 | |
| 374 | /// Open a repository or return a user-friendly error. |
| 375 | /// |