inline start transactions from pager and wal

Execute `SELECT 1`/limbo_execute_select_1
                        time:   [30.543 ns 30.585 ns 30.632 ns]
This commit is contained in:
Pere Diaz Bou
2025-04-01 18:18:43 +02:00
parent 2a49fe9bd2
commit e2d00a9f96
2 changed files with 3 additions and 0 deletions

View File

@@ -240,10 +240,12 @@ impl Pager {
(db_header.page_size - db_header.reserved_space as u16) as usize
}
#[inline(always)]
pub fn begin_read_tx(&self) -> Result<LimboResult> {
self.wal.borrow_mut().begin_read_tx()
}
#[inline(always)]
pub fn begin_write_tx(&self) -> Result<LimboResult> {
self.wal.borrow_mut().begin_write_tx()
}

View File

@@ -381,6 +381,7 @@ impl Wal for WalFile {
}
/// End a read transaction.
#[inline(always)]
fn end_read_tx(&self) -> Result<LimboResult> {
tracing::debug!("end_read_tx");
let read_lock = &mut self.get_shared().read_locks[self.max_frame_read_lock_index];