Skip to content

Commit

Permalink
feat(cubestore): Use TransactionDB
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jan 4, 2021
1 parent 3e071b4 commit a90eff5
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 70 deletions.
76 changes: 49 additions & 27 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/cubestore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ simple_logger = "1.7.0"
async-trait = "0.1.36"
actix-rt = "1.1.1"
regex = "1.3.9"
rocksdb = { version = "0.15.0", default-features = false, features = ["bzip2"] }
rocksdb = { git = 'https://github.com/cube-js/rust-rocksdb', branch = 'transaction', version = "0.15.0-SNAPSHOT", default-features = false, features = ["bzip2"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
num = "0.3.0"
enum_primitive = "0.1.1"
Expand Down
4 changes: 2 additions & 2 deletions rust/cubestore/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::telemetry::{start_track_event_loop, stop_track_event_loop};
use crate::CubeError;
use log::Level;
use mockall::automock;
use rocksdb::{Options, DB};
use rocksdb::{Options, DBUtils};
use simple_logger::SimpleLogger;
use std::future::Future;
use std::path::PathBuf;
Expand Down Expand Up @@ -228,7 +228,7 @@ impl Config {

services.stop_processing_loops().await.unwrap();
}
let _ = DB::destroy(&Options::default(), self.meta_store_path());
let _ = DBUtils::destroy(&Options::default(), self.meta_store_path());
let _ = fs::remove_dir_all(store_path.clone());
let _ = fs::remove_dir_all(remote_store_path.clone());
}
Expand Down
2 changes: 1 addition & 1 deletion rust/cubestore/src/metastore/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::base_rocks_secondary_index;
use crate::metastore::{IdRow, MetaStoreEvent};
use crate::rocks_table_impl;
use byteorder::{BigEndian, WriteBytesExt};
use rocksdb::DB;
use rocksdb::TransactionDB;
use serde::{Deserialize, Deserializer};
use std::io::Cursor;

Expand Down
2 changes: 1 addition & 1 deletion rust/cubestore/src/metastore/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::{
use crate::metastore::{IdRow, MetaStoreEvent};
use crate::{rocks_table_impl, CubeError};
use byteorder::{BigEndian, WriteBytesExt};
use rocksdb::DB;
use rocksdb::TransactionDB;
use serde::{Deserialize, Deserializer};
use std::io::{Cursor, Write};

Expand Down
2 changes: 1 addition & 1 deletion rust/cubestore/src/metastore/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::metastore::{IdRow, MetaStoreEvent, RowKey};
use crate::rocks_table_impl;
use byteorder::{BigEndian, WriteBytesExt};
use chrono::{DateTime, Utc};
use rocksdb::DB;
use rocksdb::TransactionDB;
use serde::{Deserialize, Deserializer, Serialize};
use std::io::{Cursor, Write};

Expand Down
Loading

0 comments on commit a90eff5

Please sign in to comment.