Skip to content

Commit

Permalink
add wait_for_compact to rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesamcl committed Dec 13, 2024
1 parent 9ec943b commit 2aca9a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dataload/07_create_db/rocksdb/grebi_make_rocks/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

use grebi_shared::get_id;
use grebi_shared::json_lexer::JsonToken;
use rocksdb::WaitForCompactOptions;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fs::File;
Expand Down Expand Up @@ -74,5 +75,6 @@ fn main() {

let start_time2 = std::time::Instant::now();
db.compact_range(None::<&[u8]>, None::<&[u8]>);
db.wait_for_compact(&WaitForCompactOptions::default()).unwrap();
eprintln!("Compacting took {} seconds", start_time2.elapsed().as_secs());
}

0 comments on commit 2aca9a6

Please sign in to comment.