Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/datawal-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ fn cmd_get(args: GetArgs, json: bool) -> Result<ExitCode> {
let mode: BytesMode = args.bytes.into();
let truncate = truncate_for(args.no_truncate);

let store = DataWal::open(&args.store)
let mut store = DataWal::open(&args.store)
.with_context(|| format!("open store {}", args.store.display()))?;
match store.get(&key)? {
Some(value) => {
Expand Down
6 changes: 3 additions & 3 deletions crates/datawal-core/benches/compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn bench_compact_to_delete_heavy(c: &mut Criterion) {
let mut group = c.benchmark_group("datawal_compact_to_delete_heavy");

for &(label, ratio) in LIVE_RATIOS {
let (_src, kv) = populated_with_deletes(ratio);
let (_src, mut kv) = populated_with_deletes(ratio);

group.bench_function(BenchmarkId::from_parameter(label), |b| {
b.iter_with_setup(bench_tempdir, |out_dir| {
Expand All @@ -101,7 +101,7 @@ fn bench_compact_to_overwrite_heavy(c: &mut Criterion) {
let mut group = c.benchmark_group("datawal_compact_to_overwrite_heavy");

for &(label, ratio) in LIVE_RATIOS {
let (_src, kv) = populated_with_overwrites(ratio);
let (_src, mut kv) = populated_with_overwrites(ratio);

group.bench_function(BenchmarkId::from_parameter(label), |b| {
b.iter_with_setup(bench_tempdir, |out_dir| {
Expand All @@ -118,7 +118,7 @@ fn bench_export_jsonl(c: &mut Criterion) {
let mut group = c.benchmark_group("datawal_export_jsonl");

for &(label, ratio) in LIVE_RATIOS {
let (_src, kv) = populated_with_deletes(ratio);
let (_src, mut kv) = populated_with_deletes(ratio);

group.bench_function(BenchmarkId::from_parameter(label), |b| {
b.iter_with_setup(
Expand Down
2 changes: 1 addition & 1 deletion crates/datawal-core/benches/datawal_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn bench_get(c: &mut Criterion) {

for &n in KEYDIR_SIZES {
group.bench_with_input(BenchmarkId::from_parameter(n), &n, |b, &n| {
let (_dir, kv) = populated_kv(n);
let (_dir, mut kv) = populated_kv(n);
// Round-robin over the populated key range.
let mut i = 0usize;
b.iter(|| {
Expand Down
2 changes: 1 addition & 1 deletion crates/datawal-core/examples/datawal_kv_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fn main() -> Result<()> {
);

// Reopen the compacted directory and verify state.
let kv2 = DataWal::open(&compact_dir)?;
let mut kv2 = DataWal::open(&compact_dir)?;
println!("after compact reopen: len={}", kv2.len());
println!(" a = {:?}", kv2.get(b"a")?);
println!(" b contains_key = {}", kv2.contains_key(b"b"));
Expand Down
2 changes: 1 addition & 1 deletion crates/datawal-core/examples/soak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ fn run(cli: Cli) -> Result<()> {
drop(log);

// Final-state consistency: reopen and compare keydir to `expected`.
let reopen = DataWal::open(&cli.work_dir).context("final reopen")?;
let mut reopen = DataWal::open(&cli.work_dir).context("final reopen")?;
let observed_keys: std::collections::HashSet<Vec<u8>> = reopen.keys().into_iter().collect();
let expected_keys: std::collections::HashSet<Vec<u8>> = expected.keys().cloned().collect();

Expand Down
Loading
Loading