Skip to content

Commit c5cae12

Browse files
feat: update delete function to include grove_version and adjust batch size type (#377)
1 parent 309dc76 commit c5cae12

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @QuantumExplorer @iammadab @fominok
1+
* @QuantumExplorer

tutorials/src/bin/delete.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ fn main() {
4646
println!("Before deleting, we have key2: {:?}", result2);
4747

4848
// Delete the values
49-
db.delete(root_path, key1, None, None)
49+
db.delete(root_path, key1, None, None, grove_version)
5050
.unwrap()
5151
.expect("successfully deleted key1");
52-
db.delete(root_path, key2, None, None)
52+
db.delete(root_path, key2, None, None, grove_version)
5353
.unwrap()
5454
.expect("successfully deleted key2");
5555

tutorials/src/bin/replication.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ fn sync_db_demo(
269269
) -> Result<(), grovedb::Error> {
270270
let start_time = Instant::now();
271271
let app_hash = source_db.root_hash(None, grove_version).value.unwrap();
272-
const SUBTREES_BATCH_SIZE: u32 = 2; // Small value for demo purposes
272+
const SUBTREES_BATCH_SIZE: usize = 2; // Small value for demo purposes
273273
let mut session = target_db.start_snapshot_syncing(app_hash, SUBTREES_BATCH_SIZE, CURRENT_STATE_SYNC_VERSION, grove_version)?;
274274

275275
let mut chunk_queue : VecDeque<Vec<u8>> = VecDeque::new();

0 commit comments

Comments
 (0)