Skip to content

Commit

Permalink
libsql: remove pub fields on SyncContext
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioFranco committed Nov 19, 2024
1 parent b62a586 commit 305b42b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libsql/src/local/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ impl Database {
let max_frame_no = conn.wal_frame_count();

let generation = 1; // TODO: Probe from WAL.
let start_frame_no = sync_ctx.durable_frame_num + 1;
let start_frame_no = sync_ctx.durable_frame_num() + 1;
let end_frame_no = max_frame_no;

let mut frame_no = start_frame_no;
Expand Down
12 changes: 8 additions & 4 deletions libsql/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use crate::Result;

const DEFAULT_MAX_RETRIES: usize = 5;
pub struct SyncContext {
pub sync_url: String,
pub auth_token: Option<String>,
pub max_retries: usize,
pub durable_frame_num: u32,
sync_url: String,
auth_token: Option<String>,
max_retries: usize,
durable_frame_num: u32,
}

impl SyncContext {
Expand Down Expand Up @@ -92,4 +92,8 @@ impl SyncContext {
nr_retries += 1;
}
}

pub(crate) fn durable_frame_num(&self) -> u32 {
self.durable_frame_num
}
}

0 comments on commit 305b42b

Please sign in to comment.