Skip to content

Commit

Permalink
Remove SpeeDB storage engine (#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiemh committed Jun 12, 2024
1 parent 9ffe94a commit e1123ae
Show file tree
Hide file tree
Showing 32 changed files with 41 additions and 935 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,29 +550,6 @@ jobs:
- name: Test rocksdb engine
run: cargo make ci-api-integration-rocksdb

speedb-engine:
name: SpeeDB engine
runs-on: ubuntu-latest
steps:
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Checkout sources
uses: actions/checkout@v4

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install cargo-make
run: cargo install --debug --locked cargo-make

- name: Test speedb engine
run: cargo make ci-api-integration-speedb

tikv-engine:
name: TiKV engine
runs-on: ubuntu-latest
Expand Down
27 changes: 0 additions & 27 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
default = ["storage-mem", "storage-rocksdb", "scripting", "http"]
storage-mem = ["surrealdb/kv-mem"]
storage-rocksdb = ["surrealdb/kv-rocksdb"]
storage-speedb = ["surrealdb/kv-speedb"]
storage-tikv = ["surrealdb/kv-tikv"]
storage-fdb = ["surrealdb/kv-fdb-7_1"]
storage-surrealkv = ["surrealdb/kv-surrealkv"]
Expand Down
7 changes: 1 addition & 6 deletions Makefile.ci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ args = ["check", "--locked", "--package", "surrealdb", "--features", "protocol-w
category = "CI - CHECK"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = ["clippy", "--all-targets", "--features", "storage-mem,storage-rocksdb,storage-speedb,storage-tikv,storage-fdb,scripting,http,jwks", "--tests", "--benches", "--examples", "--bins", "--", "-D", "warnings"]
args = ["clippy", "--all-targets", "--features", "storage-mem,storage-rocksdb,storage-tikv,storage-fdb,scripting,http,jwks", "--tests", "--benches", "--examples", "--bins", "--", "-D", "warnings"]

#
# Integration Tests
Expand Down Expand Up @@ -142,11 +142,6 @@ category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "rocksdb", _TEST_FEATURES = "kv-rocksdb" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }

[tasks.ci-api-integration-speedb]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "speedb", _TEST_FEATURES = "kv-speedb" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }

[tasks.ci-api-integration-fdb]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "fdb", _TEST_FEATURES = "kv-fdb-7_1" }
Expand Down
2 changes: 1 addition & 1 deletion Makefile.local.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = ["cargo-upgrade", "cargo-update"]
category = "LOCAL USAGE"
command = "cargo"
env = { RUSTDOCFLAGS = "--cfg surrealdb_unstable" }
args = ["doc", "--open", "--no-deps", "--package", "surrealdb", "--features", "rustls,native-tls,protocol-ws,protocol-http,kv-mem,kv-speedb,kv-rocksdb,kv-tikv,http,scripting,jwks"]
args = ["doc", "--open", "--no-deps", "--package", "surrealdb", "--features", "rustls,native-tls,protocol-ws,protocol-http,kv-mem,kv-rocksdb,kv-tikv,http,scripting,jwks"]

# Test
[tasks.test]
Expand Down
2 changes: 0 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ resolver = "2"
default = ["kv-mem"]
kv-mem = ["dep:echodb", "tokio/time", "dep:tempfile", "dep:ext-sort"]
kv-indxdb = ["dep:indxdb"]
kv-speedb = ["dep:speedb", "tokio/time", "dep:tempfile", "dep:ext-sort"]
kv-rocksdb = ["dep:rocksdb", "tokio/time", "dep:tempfile", "dep:ext-sort"]
kv-tikv = ["dep:tikv", "dep:tempfile", "dep:ext-sort"]
kv-fdb-5_1 = ["foundationdb/fdb-5_1", "kv-fdb", "dep:tempfile", "dep:ext-sort"]
Expand Down Expand Up @@ -142,7 +141,6 @@ serde_json = "1.0.108"
sha1 = "0.10.6"
sha2 = "0.10.8"
snap = "1.1.0"
speedb = { version = "0.0.4", features = ["lz4", "snappy"], optional = true }
storekey = "0.5.0"
surrealkv = { version = "0.1.5", optional = true }
surrealml = { version = "0.1.1", optional = true, package = "surrealml-core" }
Expand Down
1 change: 0 additions & 1 deletion core/src/cnf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ pub static INSECURE_FORWARD_RECORD_ACCESS_ERRORS: Lazy<bool> =
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
/// Specifies the buffer limit for external sorting.
/// If the environment variable is not present or cannot be parsed, a default value of 50,000 is used.
Expand Down
7 changes: 0 additions & 7 deletions core/src/ctx/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use std::fmt::{self, Debug};
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
use std::path::PathBuf;
use std::str::FromStr;
Expand Down Expand Up @@ -73,7 +72,6 @@ pub struct Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
// The temporary directory
temporary_directory: Option<Arc<PathBuf>>,
Expand Down Expand Up @@ -110,7 +108,6 @@ impl<'a> Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
temporary_directory: Option<Arc<PathBuf>>,
) -> Result<Context<'a>, Error> {
Expand All @@ -132,7 +129,6 @@ impl<'a> Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
temporary_directory,
transaction: None,
Expand Down Expand Up @@ -162,7 +158,6 @@ impl<'a> Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
temporary_directory: None,
transaction: None,
Expand All @@ -189,7 +184,6 @@ impl<'a> Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
temporary_directory: parent.temporary_directory.clone(),
transaction: parent.transaction.clone(),
Expand Down Expand Up @@ -328,7 +322,6 @@ impl<'a> Context<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
/// Return the location of the temporary directory if any
pub fn temporary_directory(&self) -> Option<&Arc<PathBuf>> {
Expand Down
1 change: 0 additions & 1 deletion core/src/dbs/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ impl Iterator {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
ctx,
stm,
Expand Down
10 changes: 0 additions & 10 deletions core/src/dbs/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use crate::dbs::plan::Explanation;
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
use crate::dbs::store::file_store::FileCollector;
use crate::dbs::store::MemoryCollector;
Expand All @@ -27,7 +26,6 @@ pub(super) enum Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
File(Box<FileCollector>),
Groups(GroupsCollector),
Expand All @@ -43,7 +41,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
ctx: &Context<'_>,
stm: &Statement<'_>,
Expand All @@ -58,7 +55,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
if stm.tempfiles() {
if let Some(temp_dir) = ctx.temporary_directory() {
Expand Down Expand Up @@ -88,7 +84,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(e) => {
e.push(val)?;
Expand All @@ -110,7 +105,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(f) => f.sort(orders),
_ => {}
Expand All @@ -128,7 +122,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(f) => f.start_limit(start, limit),
Self::Groups(_) => {}
Expand All @@ -146,7 +139,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(e) => e.len(),
Self::Groups(g) => g.len(),
Expand All @@ -163,7 +155,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(f) => f.take_vec()?,
_ => vec![],
Expand All @@ -183,7 +174,6 @@ impl Results {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
Self::File(e) => {
e.explain(exp);
Expand Down
1 change: 0 additions & 1 deletion core/src/dbs/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ impl<'a> Statement<'a> {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
pub fn tempfiles(&self) -> bool {
match self {
Expand Down
1 change: 0 additions & 1 deletion core/src/dbs/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ impl From<Vec<Value>> for MemoryCollector {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
pub(super) mod file_store {
use crate::cnf::EXTERNAL_SORTING_BUFFER_LIMIT;
Expand Down
9 changes: 0 additions & 9 deletions core/src/err/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use bincode::Error as BincodeError;
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
use ext_sort::SortError;
use fst::Error as FstError;
Expand Down Expand Up @@ -1078,13 +1077,6 @@ impl From<tikv::Error> for Error {
}
}

#[cfg(feature = "kv-speedb")]
impl From<speedb::Error> for Error {
fn from(e: speedb::Error) -> Error {
Error::Tx(e.to_string())
}
}

#[cfg(feature = "kv-rocksdb")]
impl From<rocksdb::Error> for Error {
fn from(e: rocksdb::Error) -> Error {
Expand Down Expand Up @@ -1125,7 +1117,6 @@ impl From<reqwest::Error> for Error {
feature = "kv-rocksdb",
feature = "kv-fdb",
feature = "kv-tikv",
feature = "kv-speedb"
))]
impl<S, D, I> From<SortError<S, D, I>> for Error
where
Expand Down
Loading

0 comments on commit e1123ae

Please sign in to comment.