mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-29 12:54:22 +01:00
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:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user