Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
417 changes: 24 additions & 393 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ members = [
"vendored/sqlite3-parser",

"xtask", "libsql-hrana",
"libsql-wal",
]

exclude = [
Expand Down
2 changes: 0 additions & 2 deletions libsql-replication/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ license = "MIT"
tonic = { version = "0.11", default-features = false, features = ["codegen", "prost"] }
prost = "0.12"
libsql-sys = { version = "0.8", path = "../libsql-sys", default-features = false, features = ["wal", "rusqlite", "api"] }
libsql-wal = { version = "0.1.0-alpha.1", path = "../libsql-wal/", optional = true }
rusqlite = { workspace = true }
parking_lot = "0.12.1"
bytes = { version = "1.5.0", features = ["serde"] }
Expand All @@ -38,4 +37,3 @@ tonic-build = "0.11"

[features]
encryption = ["libsql-sys/encryption"]
libsql_wal = ["dep:libsql-wal"]
4 changes: 0 additions & 4 deletions libsql-replication/src/injector/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::future::Future;

use super::rpc::replication::Frame as RpcFrame;
#[cfg(feature = "libsql_wal")]
pub use libsql_injector::LibsqlInjector;
pub use sqlite_injector::SqliteInjector;

use crate::frame::FrameNo;
Expand All @@ -11,8 +9,6 @@ pub use error::Error;
use error::Result;

mod error;
#[cfg(feature = "libsql_wal")]
mod libsql_injector;
mod sqlite_injector;

pub trait Injector {
Expand Down
5 changes: 2 additions & 3 deletions libsql-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ hyper-tungstenite = "0.11"
itertools = "0.10.5"
jsonwebtoken = "9"
libsql = { path = "../libsql/", optional = true }
libsql_replication = { path = "../libsql-replication", features = ["libsql_wal"] }
libsql-wal = { path = "../libsql-wal/" }
libsql_replication = { path = "../libsql-replication" }
metrics = "0.21.1"
metrics-util = "0.15"
metrics-exporter-prometheus = "0.12.2"
Expand Down Expand Up @@ -91,7 +90,7 @@ async-recursion = "1"
mimalloc = "0.1.42"
rheaper = { git = "https://github.com/MarinPostma/rheaper.git", tag = "v0.2.0", default-features = false, features = ["allocator"] }
tar = "0.4.41"
aws-config = "1"
aws-config = { version = "1", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1"
aws-smithy-runtime = "1.6.2"
dialoguer = { version = "0.11.0", features = ["history"] }
Expand Down
194 changes: 0 additions & 194 deletions libsql-server/src/bottomless_migrate.rs

This file was deleted.

11 changes: 5 additions & 6 deletions libsql-server/src/connection/connection_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ impl<W: Wal + Send + 'static> CoreConnection<W> {
#[cfg(test)]
mod test {
use itertools::Itertools;
use libsql_sys::wal::either::Either as EitherWAL;
use libsql_sys::wal::wrapper::PassthroughWalWrapper;
use libsql_sys::wal::{Sqlite3Wal, Sqlite3WalManager};
use rand::Rng;
Expand Down Expand Up @@ -454,7 +453,7 @@ mod test {
None,
Default::default(),
Arc::new(|_| unreachable!()),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap();
Expand Down Expand Up @@ -500,7 +499,7 @@ mod test {
None,
Default::default(),
Arc::new(|_| unreachable!()),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap();
Expand Down Expand Up @@ -551,7 +550,7 @@ mod test {
None,
Default::default(),
Arc::new(|_| unreachable!()),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap();
Expand Down Expand Up @@ -634,7 +633,7 @@ mod test {
None,
Default::default(),
Arc::new(|_| unreachable!()),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap();
Expand Down Expand Up @@ -727,7 +726,7 @@ mod test {
None,
Default::default(),
Arc::new(|_| unreachable!()),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap();
Expand Down
9 changes: 2 additions & 7 deletions libsql-server/src/connection/connection_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,19 @@ use std::time::{Duration, Instant};
use crossbeam::deque::Steal;
use crossbeam::sync::{Parker, Unparker};
use hashbrown::HashMap;
use libsql_sys::wal::either::Either;
use libsql_sys::wal::wrapper::{WrapWal, WrappedWal};
use libsql_sys::wal::{CheckpointMode, Sqlite3Wal, Sqlite3WalManager, Wal};
use libsql_wal::io::StdIO;
use libsql_wal::wal::{LibsqlWal, LibsqlWalManager};
use metrics::atomics::AtomicU64;
use parking_lot::{Mutex, MutexGuard};
use rusqlite::ErrorCode;

use crate::SqldStorage;

use super::connection_core::CoreConnection;
use super::TXN_TIMEOUT;

pub type ConnId = u64;
pub type InnerWalManager = Either<Sqlite3WalManager, LibsqlWalManager<StdIO, SqldStorage>>;
pub type InnerWalManager = Sqlite3WalManager;

pub type InnerWal = Either<Sqlite3Wal, LibsqlWal<StdIO, SqldStorage>>;
pub type InnerWal = Sqlite3Wal;
pub type ManagedConnectionWal = WrappedWal<ManagedConnectionWalWrapper, InnerWal>;

#[derive(Copy, Clone, Debug)]
Expand Down
3 changes: 1 addition & 2 deletions libsql-server/src/connection/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ pub struct LegacyConnection<T> {
#[cfg(test)]
impl LegacyConnection<libsql_sys::wal::wrapper::PassthroughWalWrapper> {
pub async fn new_test(path: &Path) -> Self {
use libsql_sys::wal::either::Either as EitherWAL;
use libsql_sys::wal::Sqlite3WalManager;

Self::new(
Expand All @@ -185,7 +184,7 @@ impl LegacyConnection<libsql_sys::wal::wrapper::PassthroughWalWrapper> {
Default::default(),
Arc::new(|_| unreachable!()),
ConnectionManager::new(TXN_TIMEOUT),
Arc::new(|| EitherWAL::A(Sqlite3WalManager::default())),
Arc::new(|| Sqlite3WalManager::default()),
)
.await
.unwrap()
Expand Down
Loading
Loading