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)
| 246 | /// Used when the parallel path is not suitable (e.g., memory-constrained |
| 247 | /// environments). |
| 248 | pub fn materialize_sequential(&self) -> Result<MaterializeResult, RepositoryError> { |
| 249 | let txn = self |
| 250 | .pristine |
| 251 | .read_txn() |
| 252 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 253 | |
| 254 | let view = txn |
| 255 | .get_view(&self.current_view) |
| 256 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 257 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 258 | name: self.current_view.clone(), |
| 259 | })?; |
| 260 | |
| 261 | let change_filter = collect_visible_change_ids(&txn, &view)?; |
| 262 | |
| 263 | let cached_txn = |
| 264 | CachedGraphTxn::new(&txn).map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 265 | |
| 266 | let working_copy = FileSystem::from_root(&self.root); |
| 267 | let options = MaterializeOptions::new().with_change_filter(change_filter); |
| 268 | |
| 269 | let result = materialize_view(&cached_txn, &self.change_store, &working_copy, options) |
| 270 | .map_err(|e| RepositoryError::Output(format!("{}", e)))?; |
| 271 | |
| 272 | self.populate_file_index(&result); |
| 273 | |
| 274 | Ok(result) |
| 275 | } |
| 276 | |
| 277 | /// Materialize only specific files to the working copy. |
| 278 | /// |
nothing calls this directly
no test coverage detected