fix build

This commit is contained in:
Nikita Sivukhin
2025-08-21 15:15:23 +04:00
parent 69c39d5d8c
commit abe3404953
4 changed files with 6 additions and 5 deletions

View File

@@ -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(),

View File

@@ -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}",

View File

@@ -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<()> {