Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agate: refactor for memtable impl #37

Merged
merged 20 commits into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix ce
Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh committed Nov 17, 2020
commit fd68fb63720750df72ae49e0216c7ee8225fa201
5 changes: 1 addition & 4 deletions src/db.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod opt;

use super::memtable::{MemTable, MemTables};
use super::{Error, Result};
use super::Result;
use crate::entry::Entry;
use crate::value::{Request, Value};

Expand Down Expand Up @@ -101,9 +101,6 @@ impl Agate {

if !opts.in_memory {
if !opts.path.exists() {
if !opts.create_if_not_exists {
return Err(Error::Config(format!("{:?} doesn't exist", opts.path)));
}
fs::create_dir_all(&opts.path)?;
}
// TODO: create wal path, acquire database path lock
Expand Down
1 change: 0 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::io;
use std::result;

use std::sync::PoisonError;
use thiserror::Error;

#[derive(Debug, Error)]
Expand Down
1 change: 0 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pub mod binary;

use crate::Result;
pub use skiplist::FixedLengthSuffixComparator as Comparator;
pub use skiplist::{FixedLengthSuffixComparator, KeyComparator};
use std::{cmp, ptr};
Expand Down