(
&self,
request: Request<RebuildSessionIndexRequest>,
)
| 4805 | } |
| 4806 | |
| 4807 | async fn rebuild_session_index( |
| 4808 | &self, |
| 4809 | request: Request<RebuildSessionIndexRequest>, |
| 4810 | ) -> Result<Response<RebuildSessionIndexResponse>, Status> { |
| 4811 | // `atomic session rebuild` — the domain rebuild runs handler-side; |
| 4812 | // the counts ride the response for the local report. |
| 4813 | let request = request.into_inner(); |
| 4814 | let handle = self.state.resolve(request.repository.as_ref().unwrap())?; |
| 4815 | self.state.log_rpc("RebuildSessionIndex", Some(&handle)); |
| 4816 | let gate_handle = handle.clone(); |
| 4817 | let _gate = gate_handle.exclusive().await; |
| 4818 | let meta = request.meta.clone(); |
| 4819 | let (indexed, skipped, corrupt) = tokio::task::spawn_blocking(move || { |
| 4820 | let repo = handle.repository()?; |
| 4821 | repo.rebuild_session_index().map_err(repository_error) |
| 4822 | }) |
| 4823 | .await |
| 4824 | .map_err(|e| Status::internal(e.to_string()))??; |
| 4825 | Ok(Response::new(RebuildSessionIndexResponse { |
| 4826 | indexed: indexed as u64, |
| 4827 | already_present: skipped as u64, |
| 4828 | corrupt: corrupt as u64, |
| 4829 | meta: response_meta(&meta), |
| 4830 | })) |
| 4831 | } |
| 4832 | |
| 4833 | async fn get_provenance( |
| 4834 | &self, |
nothing calls this directly
no test coverage detected