mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-23 16:30:39 +00:00
feat: use raft-engine crate to reimplement logstore (#799)
* chore: remove useless method in Entry trait, add proto definition for entry and namespace * feat: add proto definition for raft-engine based logstore * feat: introduce RaftEngineLogstore * feat: impl read for raft engine log store * feat: impl raft engine logstore * feat: raft engine logstore start and stop * feat: add purge bg task * fix: license header * fix: clippy * fix: toml files * feat: add some test cases * fix: CR comments * fix: CR comments * fix: check namespace validity and state of logstore * fix: CR comments; add config item to control sync/async flush per write * fix: remove unused error variants * fix: unit tests * fix: use compare and exchange to stop logstore * fix: CR comments
This commit is contained in:
@@ -39,8 +39,8 @@ datafusion-common = { workspace = true, optional = true }
|
||||
datafusion-expr = { workspace = true, optional = true }
|
||||
datafusion-physical-expr = { workspace = true, optional = true }
|
||||
datatypes = { path = "../datatypes" }
|
||||
futures.workspace = true
|
||||
futures-util = "0.3"
|
||||
futures.workspace = true
|
||||
once_cell = "1.17.0"
|
||||
paste = { workspace = true, optional = true }
|
||||
query = { path = "../query" }
|
||||
@@ -70,6 +70,7 @@ mito = { path = "../mito", features = ["test"] }
|
||||
ron = "0.7"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
storage = { path = "../storage" }
|
||||
store-api = { path = "../store-api" }
|
||||
tempdir = "0.3"
|
||||
tokio = { version = "1.18", features = ["full"] }
|
||||
tokio-test = "0.4"
|
||||
|
||||
@@ -101,12 +101,13 @@ mod tests {
|
||||
use query::QueryEngineFactory;
|
||||
|
||||
use super::*;
|
||||
type DefaultEngine = MitoEngine<EngineImpl<LocalFileLogStore>>;
|
||||
use log_store::fs::config::LogConfig;
|
||||
use log_store::fs::log::LocalFileLogStore;
|
||||
type DefaultEngine = MitoEngine<EngineImpl<RaftEngineLogStore>>;
|
||||
use log_store::raft_engine::log_store::RaftEngineLogStore;
|
||||
use log_store::LogConfig;
|
||||
use mito::engine::MitoEngine;
|
||||
use storage::config::EngineConfig as StorageEngineConfig;
|
||||
use storage::EngineImpl;
|
||||
use store_api::logstore::LogStore;
|
||||
use tempdir::TempDir;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -121,7 +122,8 @@ mod tests {
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
let log_store = LocalFileLogStore::open(&log_config).await.unwrap();
|
||||
let log_store = RaftEngineLogStore::try_new(log_config).unwrap();
|
||||
log_store.start().await.unwrap();
|
||||
|
||||
let mock_engine = Arc::new(DefaultEngine::new(
|
||||
TableEngineConfig::default(),
|
||||
|
||||
Reference in New Issue
Block a user