From 3b40ee36fe2b51a0589cc31205da6b7420276197 Mon Sep 17 00:00:00 2001 From: Quantum Explorer Date: Wed, 28 May 2025 14:12:02 +0200 Subject: [PATCH] feat: update delete function to include grove_version and adjust batch size type --- CODEOWNERS | 2 +- tutorials/src/bin/delete.rs | 4 ++-- tutorials/src/bin/replication.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index f7f552459..f3a46ec78 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @QuantumExplorer @iammadab @fominok \ No newline at end of file +* @QuantumExplorer \ No newline at end of file diff --git a/tutorials/src/bin/delete.rs b/tutorials/src/bin/delete.rs index 0655c722b..41c0379e0 100644 --- a/tutorials/src/bin/delete.rs +++ b/tutorials/src/bin/delete.rs @@ -46,10 +46,10 @@ fn main() { println!("Before deleting, we have key2: {:?}", result2); // Delete the values - db.delete(root_path, key1, None, None) + db.delete(root_path, key1, None, None, grove_version) .unwrap() .expect("successfully deleted key1"); - db.delete(root_path, key2, None, None) + db.delete(root_path, key2, None, None, grove_version) .unwrap() .expect("successfully deleted key2"); diff --git a/tutorials/src/bin/replication.rs b/tutorials/src/bin/replication.rs index 045b68191..3afb83752 100644 --- a/tutorials/src/bin/replication.rs +++ b/tutorials/src/bin/replication.rs @@ -269,7 +269,7 @@ fn sync_db_demo( ) -> Result<(), grovedb::Error> { let start_time = Instant::now(); let app_hash = source_db.root_hash(None, grove_version).value.unwrap(); - const SUBTREES_BATCH_SIZE: u32 = 2; // Small value for demo purposes + const SUBTREES_BATCH_SIZE: usize = 2; // Small value for demo purposes let mut session = target_db.start_snapshot_syncing(app_hash, SUBTREES_BATCH_SIZE, CURRENT_STATE_SYNC_VERSION, grove_version)?; let mut chunk_queue : VecDeque> = VecDeque::new();