Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
carlsverre committed Jan 6, 2024
1 parent 7f1c10d commit fa45edc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/sqlsync/examples/end-to-end-local-net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn start_server<'a>(
let coordinator = CoordinatorDocument::open(
storage_journal,
MemoryJournalFactory,
&wasm_bytes[..],
WasmReducer::new(wasm_bytes.as_slice())?,
)?;
let coordinator = Arc::new(Mutex::new(coordinator));

Expand Down Expand Up @@ -112,7 +112,7 @@ fn start_server<'a>(
}

fn handle_client(
doc: Arc<Mutex<CoordinatorDocument<MemoryJournal>>>,
doc: Arc<Mutex<CoordinatorDocument<MemoryJournal, WasmReducer>>>,
socket: TcpStream,
) -> anyhow::Result<()> {
log::info!("server: received client connection");
Expand Down
6 changes: 3 additions & 3 deletions lib/sqlsync/src/coordinator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use rusqlite::Transaction;

use crate::db::{open_with_vfs, run_in_tx, ConnectionPair};
use crate::error::Result;
use crate::reducer::{Reducer, WasmReducer};
use crate::reducer::Reducer;
use crate::replication::{
ReplicationDestination, ReplicationError, ReplicationSource,
};
Expand Down Expand Up @@ -47,7 +47,7 @@ impl<J: Journal, R: Reducer> CoordinatorDocument<J, R> {
pub fn open(
storage: J,
timeline_factory: J::Factory,
reducer: R, // reducer_wasm_bytes: &[u8],
reducer: R,
) -> Result<Self> {
let (mut sqlite, mut storage) = open_with_vfs(storage)?;

Expand Down Expand Up @@ -141,7 +141,7 @@ impl<J: Journal, R: Reducer> CoordinatorDocument<J, R> {
}

/// CoordinatorDocument knows how to replicate it's storage journal
impl<J: Journal + ReplicationSource, R: Reducer> ReplicationSource
impl<J: Journal + ReplicationSource, R> ReplicationSource
for CoordinatorDocument<J, R>
{
type Reader<'a> = <J as ReplicationSource>::Reader<'a>
Expand Down
1 change: 0 additions & 1 deletion lib/sqlsync/src/timeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use crate::{
lsn::{Lsn, LsnRange},
positioned_io::PositionedReader,
reducer::{Reducer, ReducerError, WasmReducer},
JournalError,
};

const TIMELINES_TABLE_SQL: &str = "
Expand Down

0 comments on commit fa45edc

Please sign in to comment.