async fn check_catalog_state(state: &State) -> Result<(), Error>
Checks that the in-memory catalog matches what we have persisted on disk.