diff --git a/rust/cubestore/Cargo.lock b/rust/cubestore/Cargo.lock index 1c25c2aa8145..34652bbbd5f9 100644 --- a/rust/cubestore/Cargo.lock +++ b/rust/cubestore/Cargo.lock @@ -1162,6 +1162,13 @@ dependencies = [ "twox-hash", ] +[[package]] +name = "cuberockstore" +version = "0.1.0" +dependencies = [ + "rocksdb", +] + [[package]] name = "cuberpc" version = "0.1.0" @@ -1198,6 +1205,7 @@ dependencies = [ "csv", "ctor", "cubehll", + "cuberockstore", "cuberpc", "cubezetasketch", "datafusion", @@ -1238,7 +1246,6 @@ dependencies = [ "rdkafka", "regex", "reqwest 0.12.3", - "rocksdb", "rust-s3", "sasl2-sys", "scopeguard", @@ -1271,6 +1278,7 @@ dependencies = [ "async-trait", "base64 0.13.0", "criterion", + "cuberockstore", "cubestore", "flate2", "futures 0.3.26", @@ -1282,7 +1290,6 @@ dependencies = [ "log", "pretty_assertions", "reqwest 0.12.3", - "rocksdb", "scopeguard", "serde", "serde_derive", @@ -2535,7 +2542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if 1.0.0", - "windows-targets 0.52.4", + "windows-targets 0.48.5", ] [[package]] @@ -2547,7 +2554,7 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "librocksdb-sys" version = "0.10.0+7.9.2" -source = "git+https://github.com/cube-js/rust-rocksdb?branch=cubestore#6ce33cfef170fc7b09d1945af3733c2a2a48725f" +source = "git+https://github.com/cube-js/rust-rocksdb?branch=cubestore#a481e9d86791f90cef015e93bee0866cfb372cde" dependencies = [ "bindgen", "bzip2-sys", @@ -2555,6 +2562,7 @@ dependencies = [ "glob", "libc", "libz-sys", + "tikv-jemalloc-sys", "zstd-sys", ] @@ -4168,7 +4176,7 @@ dependencies = [ [[package]] name = "rocksdb" version = "0.20.1" -source = "git+https://github.com/cube-js/rust-rocksdb?branch=cubestore#6ce33cfef170fc7b09d1945af3733c2a2a48725f" +source = "git+https://github.com/cube-js/rust-rocksdb?branch=cubestore#a481e9d86791f90cef015e93bee0866cfb372cde" dependencies = [ "libc", "librocksdb-sys", @@ -4904,6 +4912,16 @@ dependencies = [ "threadpool", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "time" version = "0.1.43" @@ -5442,7 +5460,7 @@ version = "1.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 0.1.10", "rand 0.8.4", "static_assertions", ] diff --git a/rust/cubestore/Cargo.toml b/rust/cubestore/Cargo.toml index 44e909fc417b..2e925776f955 100644 --- a/rust/cubestore/Cargo.toml +++ b/rust/cubestore/Cargo.toml @@ -5,5 +5,6 @@ members = [ "cubestore-sql-tests", "cubehll", "cubezetasketch", - "cuberpc" + "cuberpc", + "cuberockstore", ] diff --git a/rust/cubestore/Dockerfile b/rust/cubestore/Dockerfile index b8be50917429..f2de85b81823 100644 --- a/rust/cubestore/Dockerfile +++ b/rust/cubestore/Dockerfile @@ -23,6 +23,7 @@ WORKDIR /usr/src WORKDIR /build/cubestore COPY Cargo.toml . COPY Cargo.lock . +COPY cuberockstore cuberockstore COPY cubehll cubehll COPY cubezetasketch cubezetasketch COPY cuberpc cuberpc diff --git a/rust/cubestore/cuberockstore/Cargo.toml b/rust/cubestore/cuberockstore/Cargo.toml new file mode 100644 index 000000000000..734f919e4ba7 --- /dev/null +++ b/rust/cubestore/cuberockstore/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "cuberockstore" +version = "0.1.0" +authors = ["Cube Dev, Inc."] +edition = "2021" +license = "Apache-2.0" +description = "Cube Rocks Store" + +[dependencies] + +[target.'cfg(all(target_os = "linux", target_env = "gnu"))'.dependencies] +# jemalloc is supported only for gnu linux +# TODO: Fix issue with cross building for linux musl & jemalloc +rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy", "jemalloc"] } + +[target.'cfg(all(target_os = "linux", not(target_env = "gnu")))'.dependencies] +rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] } + +[target.'cfg(not(target_os = "linux"))'.dependencies] +rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] } diff --git a/rust/cubestore/cuberockstore/src/lib.rs b/rust/cubestore/cuberockstore/src/lib.rs new file mode 100644 index 000000000000..9cf778f77816 --- /dev/null +++ b/rust/cubestore/cuberockstore/src/lib.rs @@ -0,0 +1,2 @@ +// re-export +pub use rocksdb; diff --git a/rust/cubestore/cubestore-sql-tests/Cargo.toml b/rust/cubestore/cubestore-sql-tests/Cargo.toml index e3411d2b83ab..2c31c02eca9e 100644 --- a/rust/cubestore/cubestore-sql-tests/Cargo.toml +++ b/rust/cubestore/cubestore-sql-tests/Cargo.toml @@ -53,7 +53,7 @@ tar = "0.4.38" [dev-dependencies] criterion = { version = "0.4.0", features = ["async_tokio", "html_reports"] } -rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] } +cuberockstore = { path = "../cuberockstore" } [[bench]] name = "in_process" diff --git a/rust/cubestore/cubestore-sql-tests/benches/in_process.rs b/rust/cubestore/cubestore-sql-tests/benches/in_process.rs index 7d86395e537b..d9418140983d 100644 --- a/rust/cubestore/cubestore-sql-tests/benches/in_process.rs +++ b/rust/cubestore/cubestore-sql-tests/benches/in_process.rs @@ -1,6 +1,6 @@ use criterion::{criterion_group, criterion_main, Criterion}; +use cuberockstore::rocksdb; use cubestore_sql_tests::cubestore_benches; -use rocksdb::{Options, DB}; use std::fs; use std::time::Duration; use tokio::runtime::Builder; @@ -41,8 +41,8 @@ fn in_process_bench(criterion: &mut Criterion) { runtime.shutdown_timeout(Duration::from_secs(2)); } - let _ = DB::destroy(&Options::default(), config.meta_store_path()); - let _ = DB::destroy(&Options::default(), config.cache_store_path()); + let _ = rocksdb::DB::destroy(&rocksdb::Options::default(), config.meta_store_path()); + let _ = rocksdb::DB::destroy(&rocksdb::Options::default(), config.cache_store_path()); let _ = fs::remove_dir_all(config.local_dir().clone()); } } diff --git a/rust/cubestore/cubestore/Cargo.toml b/rust/cubestore/cubestore/Cargo.toml index 900b3c23329f..e597d8a24358 100644 --- a/rust/cubestore/cubestore/Cargo.toml +++ b/rust/cubestore/cubestore/Cargo.toml @@ -23,6 +23,7 @@ serde_derive = "1.0.115" serde = "1.0.115" serde_repr = "0.1" serde_bytes = "0.11.5" +cuberockstore = { path = "../cuberockstore" } cubehll = { path = "../cubehll" } cubezetasketch = { path = "../cubezetasketch" } cuberpc = { path = "../cuberpc" } @@ -41,7 +42,6 @@ simple_logger = "1.7.0" async-trait = "0.1.79" actix-rt = "2.7.0" regex = "1.3.9" -rocksdb = { git = "https://github.com/cube-js/rust-rocksdb", branch = "cubestore", default-features = false, features = ["zstd", "snappy"] } uuid = { version = "0.8", features = ["serde", "v4"] } num = "0.3.0" enum_primitive = "0.1.1" diff --git a/rust/cubestore/cubestore/src/cachestore/cache_item.rs b/rust/cubestore/cubestore/src/cachestore/cache_item.rs index 20d1ec188d2c..2d0b1171f04e 100644 --- a/rust/cubestore/cubestore/src/cachestore/cache_item.rs +++ b/rust/cubestore/cubestore/src/cachestore/cache_item.rs @@ -4,7 +4,7 @@ use crate::metastore::{ use crate::{base_rocks_secondary_index, rocks_table_new, CubeError}; use chrono::serde::ts_seconds_option; use chrono::{DateTime, Duration, Utc}; -use rocksdb::WriteBatch; +use cuberockstore::rocksdb::WriteBatch; use serde::{Deserialize, Deserializer, Serialize}; #[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)] diff --git a/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs b/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs index ff00c2df4b5e..db770521dac9 100644 --- a/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs +++ b/rust/cubestore/cubestore/src/cachestore/cache_rocksstore.rs @@ -22,8 +22,8 @@ use crate::util::WorkerLoop; use crate::{app_metrics, CubeError}; use async_trait::async_trait; +use cuberockstore::rocksdb::{BlockBasedOptions, Cache, Options, DB}; use futures_timer::Delay; -use rocksdb::{BlockBasedOptions, Cache, Options, DB}; use crate::cachestore::cache_eviction_manager::{CacheEvictionManager, EvictionResult}; use crate::cachestore::compaction::CompactionPreloadedState; @@ -31,6 +31,7 @@ use crate::cachestore::listener::RocksCacheStoreListener; use crate::cachestore::queue_item_payload::QueueItemPayloadRocksTable; use crate::table::{Row, TableValue}; use chrono::{DateTime, Utc}; +use cuberockstore::rocksdb; use datafusion::cube_ext; use deepsize::DeepSizeOf; use itertools::Itertools; @@ -87,7 +88,9 @@ impl RocksStoreDetails for RocksCacheStoreDetails { let mut opts = Options::default(); opts.create_if_missing(true); - opts.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(13)); + opts.set_prefix_extractor(cuberockstore::rocksdb::SliceTransform::create_fixed_prefix( + 13, + )); opts.set_compaction_filter_factory(compaction::MetaStoreCacheCompactionFactory::new( compaction_state, )); @@ -125,7 +128,9 @@ impl RocksStoreDetails for RocksCacheStoreDetails { let rocksdb_config = config.cachestore_rocksdb_config(); let mut opts = Options::default(); - opts.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(13)); + opts.set_prefix_extractor(cuberockstore::rocksdb::SliceTransform::create_fixed_prefix( + 13, + )); let block_opts = { let mut block_opts = BlockBasedOptions::default(); diff --git a/rust/cubestore/cubestore/src/cachestore/compaction.rs b/rust/cubestore/cubestore/src/cachestore/compaction.rs index a186fe497842..b1be09080a09 100644 --- a/rust/cubestore/cubestore/src/cachestore/compaction.rs +++ b/rust/cubestore/cubestore/src/cachestore/compaction.rs @@ -4,10 +4,12 @@ use crate::metastore::{ use crate::TableId; use chrono::{DateTime, Utc}; +use cuberockstore::rocksdb::compaction_filter::CompactionFilter; +use cuberockstore::rocksdb::compaction_filter_factory::{ + CompactionFilterContext, CompactionFilterFactory, +}; +use cuberockstore::rocksdb::CompactionDecision; use log::{error, trace, warn}; -use rocksdb::compaction_filter::CompactionFilter; -use rocksdb::compaction_filter_factory::{CompactionFilterContext, CompactionFilterFactory}; -use rocksdb::CompactionDecision; use std::collections::HashMap; use std::ffi::{CStr, CString}; use std::sync::{Arc, Mutex}; @@ -248,7 +250,7 @@ mod tests { use crate::metastore::{BaseRocksSecondaryIndex, RocksTable}; use crate::TableId; use chrono::Duration; - use rocksdb::compaction_filter::Decision; + use cuberockstore::rocksdb::compaction_filter::Decision; use serde::Serialize; fn get_test_filter_context() -> CompactionFilterContext { diff --git a/rust/cubestore/cubestore/src/cachestore/queue_item.rs b/rust/cubestore/cubestore/src/cachestore/queue_item.rs index 435a913d4249..0fa2f072545f 100644 --- a/rust/cubestore/cubestore/src/cachestore/queue_item.rs +++ b/rust/cubestore/cubestore/src/cachestore/queue_item.rs @@ -6,7 +6,7 @@ use crate::table::{Row, TableValue}; use crate::{base_rocks_secondary_index, rocks_table_new, CubeError}; use chrono::serde::{ts_seconds, ts_seconds_option}; use chrono::{DateTime, Duration, Utc}; -use rocksdb::WriteBatch; +use cuberockstore::rocksdb::WriteBatch; use std::cmp::Ordering; use std::sync::Arc; diff --git a/rust/cubestore/cubestore/src/cachestore/queue_item_payload.rs b/rust/cubestore/cubestore/src/cachestore/queue_item_payload.rs index 0b192362867e..1d3ac9076354 100644 --- a/rust/cubestore/cubestore/src/cachestore/queue_item_payload.rs +++ b/rust/cubestore/cubestore/src/cachestore/queue_item_payload.rs @@ -4,7 +4,7 @@ use crate::metastore::{ use crate::{base_rocks_secondary_index, rocks_table_new, CubeError}; use chrono::serde::{ts_seconds, ts_seconds_option}; use chrono::{DateTime, Duration, Utc}; -use rocksdb::WriteBatch; +use cuberockstore::rocksdb::WriteBatch; use serde::{Deserialize, Deserializer, Serialize}; #[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)] diff --git a/rust/cubestore/cubestore/src/cachestore/queue_result.rs b/rust/cubestore/cubestore/src/cachestore/queue_result.rs index 79f2868722f9..eea008bf8a10 100644 --- a/rust/cubestore/cubestore/src/cachestore/queue_result.rs +++ b/rust/cubestore/cubestore/src/cachestore/queue_result.rs @@ -6,7 +6,7 @@ use crate::metastore::{ use crate::{base_rocks_secondary_index, rocks_table_new, CubeError}; use chrono::serde::ts_seconds; use chrono::{DateTime, Duration, Utc}; -use rocksdb::WriteBatch; +use cuberockstore::rocksdb::WriteBatch; use serde::{Deserialize, Deserializer, Serialize}; #[derive(Clone, Serialize, Deserialize, Debug, Eq, PartialEq)] diff --git a/rust/cubestore/cubestore/src/config/mod.rs b/rust/cubestore/cubestore/src/config/mod.rs index cb0101bef46f..1f4886836350 100644 --- a/rust/cubestore/cubestore/src/config/mod.rs +++ b/rust/cubestore/cubestore/src/config/mod.rs @@ -43,13 +43,13 @@ use crate::telemetry::{ }; use crate::util::memory::{MemoryHandler, MemoryHandlerImpl}; use crate::CubeError; +use cuberockstore::rocksdb::{Options, DB}; use datafusion::cube_ext; use datafusion::physical_plan::parquet::{LruParquetMetadataCache, NoopParquetMetadataCache}; use futures::future::join_all; use log::Level; use log::{debug, error}; use mockall::automock; -use rocksdb::{Options, DB}; use simple_logger::SimpleLogger; use std::fmt::Display; use std::future::Future; diff --git a/rust/cubestore/cubestore/src/lib.rs b/rust/cubestore/cubestore/src/lib.rs index e017438dd465..f29922c70d88 100644 --- a/rust/cubestore/cubestore/src/lib.rs +++ b/rust/cubestore/cubestore/src/lib.rs @@ -197,8 +197,8 @@ impl From for CubeError { } } -impl From for CubeError { - fn from(v: rocksdb::Error) -> Self { +impl From for CubeError { + fn from(v: cuberockstore::rocksdb::Error) -> Self { CubeError::from_error(v.into_string()) } } diff --git a/rust/cubestore/cubestore/src/metastore/mod.rs b/rust/cubestore/cubestore/src/metastore/mod.rs index fcc634c09259..608eac40ec6a 100644 --- a/rust/cubestore/cubestore/src/metastore/mod.rs +++ b/rust/cubestore/cubestore/src/metastore/mod.rs @@ -22,8 +22,8 @@ pub use rocks_table::*; use crate::cluster::node_name_by_partition; use crate::metastore::partition::partition_file_name; use async_trait::async_trait; +use cuberockstore::rocksdb::{BlockBasedOptions, Cache, Env, MergeOperands, Options, DB}; use log::info; -use rocksdb::{BlockBasedOptions, Cache, Env, MergeOperands, Options, DB}; use serde::{Deserialize, Serialize}; use std::hash::Hash; use std::{env, io::Cursor, sync::Arc}; @@ -61,6 +61,7 @@ use chrono::{DateTime, Utc}; use chunks::ChunkRocksTable; use core::fmt; use cubehll::HllSketch; +use cuberockstore::rocksdb::backup::{BackupEngine, BackupEngineOptions}; use cubezetasketch::HyperLogLogPlusPlus; use datafusion::cube_ext; use futures_timer::Delay; @@ -72,7 +73,6 @@ use parquet::basic::{ConvertedType, Repetition}; use parquet::{basic::Type, schema::types}; use partition::{PartitionRocksIndex, PartitionRocksTable}; use regex::Regex; -use rocksdb::backup::{BackupEngine, BackupEngineOptions}; use schema::{SchemaRocksIndex, SchemaRocksTable}; use smallvec::alloc::fmt::Formatter; @@ -1263,7 +1263,9 @@ impl RocksStoreDetails for RocksMetaStoreDetails { let rocksdb_config = config.metastore_rocksdb_config(); let mut opts = Options::default(); opts.create_if_missing(true); - opts.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(13)); + opts.set_prefix_extractor(cuberockstore::rocksdb::SliceTransform::create_fixed_prefix( + 13, + )); opts.set_merge_operator_associative("meta_store merge", meta_store_merge); // TODO(ovr): Decrease after additional fix for get_updates_since opts.set_wal_ttl_seconds( @@ -1296,7 +1298,9 @@ impl RocksStoreDetails for RocksMetaStoreDetails { fn open_readonly_db(&self, path: &Path, config: &Arc) -> Result { let rocksdb_config = config.metastore_rocksdb_config(); let mut opts = Options::default(); - opts.set_prefix_extractor(rocksdb::SliceTransform::create_fixed_prefix(13)); + opts.set_prefix_extractor(cuberockstore::rocksdb::SliceTransform::create_fixed_prefix( + 13, + )); let block_opts = { let mut block_opts = BlockBasedOptions::default(); @@ -4881,8 +4885,8 @@ mod tests { use super::*; use crate::config::{init_test_logger, Config}; use crate::remotefs::{LocalDirRemoteFs, RemoteFs}; + use cuberockstore::rocksdb::IteratorMode; use futures_timer::Delay; - use rocksdb::IteratorMode; use std::thread::sleep; use std::time::Duration; use std::{env, fs}; diff --git a/rust/cubestore/cubestore/src/metastore/rocks_store.rs b/rust/cubestore/cubestore/src/metastore/rocks_store.rs index 22d98ce69f19..0b43f7bf4513 100644 --- a/rust/cubestore/cubestore/src/metastore/rocks_store.rs +++ b/rust/cubestore/cubestore/src/metastore/rocks_store.rs @@ -9,10 +9,12 @@ use async_trait::async_trait; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use datafusion::cube_ext; +use cuberockstore::rocksdb::backup::{BackupEngine, BackupEngineOptions, RestoreOptions}; +use cuberockstore::rocksdb::checkpoint::Checkpoint; +use cuberockstore::rocksdb::{ + DBCompressionType, Env, Snapshot, WriteBatch, WriteBatchIterator, DB, +}; use log::{info, trace}; -use rocksdb::backup::{BackupEngine, BackupEngineOptions, RestoreOptions}; -use rocksdb::checkpoint::Checkpoint; -use rocksdb::{DBCompressionType, Env, Snapshot, WriteBatch, WriteBatchIterator, DB}; use serde::{Deserialize, Serialize}; use serde_repr::*; use std::collections::HashMap; @@ -21,6 +23,7 @@ use std::io::{Cursor, Write}; use crate::metastore::snapshot_info::SnapshotInfo; use chrono::{DateTime, NaiveDate, NaiveDateTime, Utc}; +use cuberockstore::rocksdb; use std::path::{Path, PathBuf}; use std::sync::{Arc, Mutex}; use std::time::{Duration, SystemTime}; diff --git a/rust/cubestore/cubestore/src/metastore/rocks_table.rs b/rust/cubestore/cubestore/src/metastore/rocks_table.rs index 1883c7bd8fb0..13a8ccaba8fb 100644 --- a/rust/cubestore/cubestore/src/metastore/rocks_table.rs +++ b/rust/cubestore/cubestore/src/metastore/rocks_table.rs @@ -8,8 +8,10 @@ use crate::metastore::{ use crate::CubeError; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; use chrono::{DateTime, Utc}; +use cuberockstore::rocksdb::{ + DBIterator, Direction, IteratorMode, ReadOptions, Snapshot, WriteBatch, DB, +}; use itertools::Itertools; -use rocksdb::{DBIterator, Direction, IteratorMode, ReadOptions, Snapshot, WriteBatch, DB}; use serde::{Deserialize, Deserializer, Serialize}; use std::collections::hash_map::DefaultHasher; use std::collections::HashMap; @@ -35,7 +37,7 @@ macro_rules! rocks_table_impl { impl<'a> crate::metastore::BaseRocksTable for $rocks_table<'a> { fn migrate_table( &self, - _batch: &mut rocksdb::WriteBatch, + _batch: &mut cuberockstore::rocksdb::WriteBatch, table_info: crate::metastore::TableInfo, ) -> Result<(), crate::CubeError> { Err(crate::CubeError::internal(format!( @@ -55,11 +57,11 @@ macro_rules! rocks_table_new { impl<'a> crate::metastore::RocksTable for $rocks_table<'a> { type T = $table; - fn db(&self) -> &rocksdb::DB { + fn db(&self) -> &cuberockstore::rocksdb::DB { self.db.db } - fn snapshot(&self) -> &rocksdb::Snapshot { + fn snapshot(&self) -> &cuberockstore::rocksdb::Snapshot { self.db.snapshot } diff --git a/rust/cubestore/cubestore/src/sql/mod.rs b/rust/cubestore/cubestore/src/sql/mod.rs index 65205f931c7c..2a484059c261 100644 --- a/rust/cubestore/cubestore/src/sql/mod.rs +++ b/rust/cubestore/cubestore/src/sql/mod.rs @@ -1653,12 +1653,12 @@ mod tests { use crate::metastore::job::JobType; use crate::store::compaction::CompactionService; use async_compression::tokio::write::GzipEncoder; + use cuberockstore::rocksdb::{Options, DB}; use futures_timer::Delay; use itertools::Itertools; use pretty_assertions::assert_eq; use rand::distributions::Alphanumeric; use rand::{thread_rng, Rng}; - use rocksdb::{Options, DB}; use tokio::io::{AsyncWriteExt, BufWriter}; use uuid::Uuid; diff --git a/rust/cubestore/cubestore/src/store/compaction.rs b/rust/cubestore/cubestore/src/store/compaction.rs index b1aa50474751..95eabcf9d352 100644 --- a/rust/cubestore/cubestore/src/store/compaction.rs +++ b/rust/cubestore/cubestore/src/store/compaction.rs @@ -1398,8 +1398,8 @@ mod tests { use arrow::array::{Int64Array, StringArray}; use arrow::datatypes::Schema; use arrow::record_batch::RecordBatch; + use cuberockstore::rocksdb::{Options, DB}; use datafusion::physical_plan::collect; - use rocksdb::{Options, DB}; use std::fs; use std::path::{Path, PathBuf}; diff --git a/rust/cubestore/cubestore/src/store/mod.rs b/rust/cubestore/cubestore/src/store/mod.rs index 9476ee64c3e8..5c203a6c6826 100644 --- a/rust/cubestore/cubestore/src/store/mod.rs +++ b/rust/cubestore/cubestore/src/store/mod.rs @@ -799,7 +799,7 @@ mod tests { use crate::table::data::{concat_record_batches, rows_to_columns}; use crate::{metastore::ColumnType, table::TableValue}; use arrow::array::{Int64Array, StringArray}; - use rocksdb::{Options, DB}; + use cuberockstore::rocksdb::{Options, DB}; use std::fs; use std::path::{Path, PathBuf};