(self, collection: &Collection, config: &Config)
| 40 | } |
| 41 | |
| 42 | pub fn pre_commit(self, collection: &Collection, config: &Config) -> Result<(), WaCustomError> { |
| 43 | if let Some(hnsw_index) = &*collection.hnsw_index.read() { |
| 44 | hnsw_index.pre_commit_transaction(collection, self.version, config)?; |
| 45 | } |
| 46 | if let Some(inverted_index) = &*collection.inverted_index.read() { |
| 47 | inverted_index.pre_commit_transaction(collection, self.version, config)?; |
| 48 | } |
| 49 | if let Some(tf_idf_index) = &*collection.tf_idf_index.read() { |
| 50 | tf_idf_index.pre_commit_transaction(collection, self.version, config)?; |
| 51 | } |
| 52 | if let Some(key_value_index) = &*collection.key_value_index.read() { |
| 53 | key_value_index.pre_commit_transaction(collection, self.version, config)?; |
| 54 | } |
| 55 | if let Some(usv_index) = &*collection.usv_index.read() { |
| 56 | usv_index.pre_commit_transaction(collection, self.version, config)?; |
| 57 | } |
| 58 | collection.flush()?; |
| 59 | Ok(()) |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
no test coverage detected