From 2cac0c0673f3ca414ea277f2f4bc4c17c0bb945a Mon Sep 17 00:00:00 2001 From: abbycin Date: Mon, 8 Jun 2026 07:03:28 +0800 Subject: [PATCH] fix compile --- .gitignore | 1 + src/main.rs | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index e1b2a3a..3eacb4f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ __pycache__ !README.md !repro.md *.html +analyze_results.py diff --git a/src/main.rs b/src/main.rs index be28bdc..58a64ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use clap::{ArgAction, Parser}; -use mace::{Mace, Options}; +use mace::{BucketOptions, Mace, Options}; use rand::rngs::StdRng; use rand::seq::SliceRandom; use rand::{Rng, SeedableRng}; @@ -632,27 +632,29 @@ fn main() { let mut opt = Options::new(path); opt.sync_on_write = durability_mode == DurabilityMode::Durable; opt.concurrent_write = 8; - opt.inline_size = args.blob_size; - opt.checkpoint_size = 128 << 20; - opt.cache_capacity = 4 << 30; opt.lru_capacity = 1 << 30; opt.blob_handle_cache_capacity = 256; opt.data_handle_cache_capacity = 256; - opt.pool_capacity = 16 * (64 << 20); - opt.enable_backpressure = true; opt.gc_timeout = 5 * 1000; opt.gc_eager = false; opt.data_garbage_ratio = 50; opt.tmp_store = cleanup; + let mut bopt = BucketOptions::new(); + bopt.inline_size = args.blob_size; + bopt.checkpoint_size = 128 << 20; + bopt.cache_capacity = 4 << 30; + bopt.enable_backpressure = true; + bopt.pool_capacity = 1 << 30; + let db = Mace::new(opt.validate().unwrap()).unwrap(); db.disable_gc(); let bkt = if args.reuse_path { db.get_bucket("default") - .or_else(|_| db.new_bucket("default")) + .or_else(|_| db.new_bucket("default", bopt)) .unwrap() } else { - db.new_bucket("default").unwrap() + db.new_bucket("default", bopt).unwrap() }; let value = Arc::new(vec![b'0'; args.value_size]);