mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-09 11:14:20 +01:00
fix build
This commit is contained in:
@@ -349,7 +349,7 @@ impl<C: ProtocolIO> DatabaseSyncEngine<C> {
|
||||
// todo(sivukhin): push frames in multiple batches
|
||||
let generation = self.meta().synced_generation;
|
||||
let start_frame = self.meta().synced_frame_no.unwrap_or(0) + 1;
|
||||
let end_frame = wal.conn().wal_frame_count()? + 1;
|
||||
let end_frame = wal.conn().wal_state()?.max_frame + 1;
|
||||
match wal_push(
|
||||
coro,
|
||||
self.protocol.as_ref(),
|
||||
|
||||
@@ -746,7 +746,7 @@ pub async fn transfer_physical_changes(
|
||||
let mut source_session = WalSession::new(source_conn.clone());
|
||||
source_session.begin()?;
|
||||
|
||||
let source_frames_count = source_conn.wal_frame_count()?;
|
||||
let source_frames_count = source_conn.wal_state()?.max_frame;
|
||||
assert!(
|
||||
source_frames_count >= source_wal_match_watermark,
|
||||
"watermark can't be greater than current frames count: {source_frames_count} vs {source_wal_match_watermark}",
|
||||
|
||||
@@ -191,7 +191,7 @@ pub struct DatabaseWalSession {
|
||||
impl DatabaseWalSession {
|
||||
pub async fn new(coro: &Coro, wal_session: WalSession) -> Result<Self> {
|
||||
let conn = wal_session.conn();
|
||||
let frames_count = conn.wal_frame_count()?;
|
||||
let frames_count = conn.wal_state()?.max_frame;
|
||||
let mut page_size_stmt = conn.prepare("PRAGMA page_size")?;
|
||||
let Some(row) = run_stmt_expect_one_row(coro, &mut page_size_stmt).await? else {
|
||||
return Err(Error::DatabaseTapeError(
|
||||
@@ -217,7 +217,7 @@ impl DatabaseWalSession {
|
||||
}
|
||||
|
||||
pub fn frames_count(&self) -> Result<u64> {
|
||||
Ok(self.wal_session.conn().wal_frame_count()?)
|
||||
Ok(self.wal_session.conn().wal_state()?.max_frame)
|
||||
}
|
||||
|
||||
pub fn append_page(&mut self, page_no: u32, page: &[u8]) -> Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user