Sequential materialize fallback. Processes files one at a time through the streaming writer path. Used when the parallel path is not suitable (e.g., memory-constrained environments).
(&self)
| 320 | /// Used when the parallel path is not suitable (e.g., memory-constrained |
| 321 | /// environments). |
| 322 | pub fn materialize_sequential(&self) -> Result<MaterializeResult, RepositoryError> { |
| 323 | let txn = self |
| 324 | .pristine |
| 325 | .read_txn() |
| 326 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 327 | |
| 328 | let view = txn |
| 329 | .get_view(&self.current_view) |
| 330 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 331 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 332 | name: self.current_view.clone(), |
| 333 | })?; |
| 334 | |
| 335 | let change_filter = collect_visible_change_ids(&txn, &view)?; |
| 336 | |
| 337 | let cached_txn = |
| 338 | CachedGraphTxn::new(&txn).map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 339 | |
| 340 | let working_copy = FileSystem::from_root(&self.root); |
| 341 | let options = MaterializeOptions::new().with_change_filter(change_filter); |
| 342 | |
| 343 | let result = materialize_view(&cached_txn, &self.change_store, &working_copy, options) |
| 344 | .map_err(|e| RepositoryError::Output(format!("{}", e)))?; |
| 345 | |
| 346 | self.populate_file_index(&result); |
| 347 | |
| 348 | Ok(result) |
| 349 | } |
| 350 | |
| 351 | /// Materialize only specific files to the working copy. |
| 352 | /// |
nothing calls this directly
no test coverage detected