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 mini-lsm-starter/src/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl MemTable {
unimplemented!()
}

/// Implement this in week 3, day 5.
/// Implement this in week 3, day 5; if you want to implement this earlier, use `&[u8]` as the key type.
pub fn put_batch(&self, _data: &[(KeySlice, &[u8])]) -> Result<()> {
unimplemented!()
}
Expand Down
13 changes: 7 additions & 6 deletions mini-lsm-starter/src/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@
#![allow(unused_variables)] // TODO(you): remove this lint after implementing this mod
#![allow(dead_code)] // TODO(you): remove this lint after implementing this mod

use anyhow::Result;
use bytes::Bytes;
use crossbeam_skiplist::SkipMap;
use parking_lot::Mutex;
use std::fs::File;
use std::io::BufWriter;
use std::path::Path;
use std::sync::Arc;

use anyhow::Result;
use bytes::Bytes;
use crossbeam_skiplist::SkipMap;
use parking_lot::Mutex;
use crate::key::KeySlice;

pub struct Wal {
file: Arc<Mutex<BufWriter<File>>>,
Expand All @@ -42,8 +43,8 @@ impl Wal {
unimplemented!()
}

/// Implement this in week 3, day 5.
pub fn put_batch(&self, _data: &[(&[u8], &[u8])]) -> Result<()> {
/// Implement this in week 3, day 5; if you want to implement this earlier, use `&[u8]` as the key type.
pub fn put_batch(&self, _data: &[(KeySlice, &[u8])]) -> Result<()> {
unimplemented!()
}

Expand Down
2 changes: 1 addition & 1 deletion mini-lsm/src/mem_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl MemTable {
Ok(())
}

/// Implement this in week 3, day 5.
/// Implement this in week 3, day 5; if you want to implement this earlier, use `&[u8]` as the key type.
pub fn put_batch(&self, _data: &[(KeySlice, &[u8])]) -> Result<()> {
unimplemented!()
}
Expand Down
6 changes: 4 additions & 2 deletions mini-lsm/src/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ use bytes::{Buf, BufMut, Bytes};
use crossbeam_skiplist::SkipMap;
use parking_lot::Mutex;

use crate::key::KeySlice;

pub struct Wal {
file: Arc<Mutex<BufWriter<File>>>,
}
Expand Down Expand Up @@ -93,8 +95,8 @@ impl Wal {
Ok(())
}

/// Implement this in week 3, day 5.
pub fn put_batch(&self, _data: &[(&[u8], &[u8])]) -> Result<()> {
/// Implement this in week 3, day 5; if you want to implement this earlier, use `&[u8]` as the key type.
pub fn put_batch(&self, _data: &[(KeySlice, &[u8])]) -> Result<()> {
unimplemented!()
}

Expand Down