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)
| 106 | /// Used when the parallel path is not suitable (e.g., memory-constrained |
| 107 | /// environments). |
| 108 | pub fn materialize_sequential(&self) -> Result<MaterializeResult, RepositoryError> { |
| 109 | let txn = self |
| 110 | .pristine |
| 111 | .read_txn() |
| 112 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 113 | |
| 114 | let view = txn |
| 115 | .get_view(&self.current_view) |
| 116 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 117 | .ok_or_else(|| RepositoryError::ViewNotFound { |
| 118 | name: self.current_view.clone(), |
| 119 | })?; |
| 120 | |
| 121 | let change_filter = collect_visible_change_ids(&txn, &view)?; |
| 122 | |
| 123 | let cached_txn = |
| 124 | CachedGraphTxn::new(&txn).map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 125 | |
| 126 | let working_copy = FileSystem::from_root(&self.root); |
| 127 | let options = MaterializeOptions::new().with_change_filter(change_filter); |
| 128 | |
| 129 | let result = materialize_view(&cached_txn, &self.change_store, &working_copy, options) |
| 130 | .map_err(|e| RepositoryError::Output(format!("{}", e)))?; |
| 131 | |
| 132 | self.populate_file_index(&result); |
| 133 | |
| 134 | Ok(result) |
| 135 | } |
| 136 | |
| 137 | /// Materialize only specific files to the working copy. |
| 138 | /// |
nothing calls this directly
no test coverage detected