pub struct WalFile { /* private fields */ }Implementations§
Source§impl WalFile
impl WalFile
pub fn new( io: Arc<dyn IO>, page_size: u32, shared: Arc<UnsafeCell<WalFileShared>>, buffer_pool: Rc<BufferPool>, ) -> Self
Trait Implementations§
Source§impl Wal for WalFile
impl Wal for WalFile
Source§fn begin_read_tx(&mut self) -> Result<LimboResult>
fn begin_read_tx(&mut self) -> Result<LimboResult>
Begin a read transaction.
Source§fn end_read_tx(&self) -> Result<LimboResult>
fn end_read_tx(&self) -> Result<LimboResult>
End a read transaction.
Source§fn begin_write_tx(&mut self) -> Result<LimboResult>
fn begin_write_tx(&mut self) -> Result<LimboResult>
Begin a write transaction
Source§fn end_write_tx(&self) -> Result<LimboResult>
fn end_write_tx(&self) -> Result<LimboResult>
End a write transaction
Source§fn find_frame(&self, page_id: u64) -> Result<Option<u64>>
fn find_frame(&self, page_id: u64) -> Result<Option<u64>>
Find the latest frame containing a page.
Source§fn read_frame(
&self,
frame_id: u64,
page: PageRef,
buffer_pool: Rc<BufferPool>,
) -> Result<()>
fn read_frame( &self, frame_id: u64, page: PageRef, buffer_pool: Rc<BufferPool>, ) -> Result<()>
Read a frame from the WAL.
Source§fn append_frame(
&mut self,
page: PageRef,
db_size: u32,
write_counter: Rc<RefCell<usize>>,
) -> Result<()>
fn append_frame( &mut self, page: PageRef, db_size: u32, write_counter: Rc<RefCell<usize>>, ) -> Result<()>
Write a frame to the WAL.
Source§fn rollback(&self)
fn rollback(&self)
Roll back the current write transaction.
Restores shared.max_frame and shared.last_checksum to the snapshot
captured in begin_write_tx, then removes from the frame cache every
frame that was appended during this transaction.
Source§fn read_frame_raw(
&self,
frame_id: u64,
buffer_pool: Rc<BufferPool>,
frame: *mut u8,
frame_len: u32,
) -> Result<Arc<Completion>>
fn read_frame_raw( &self, frame_id: u64, buffer_pool: Rc<BufferPool>, frame: *mut u8, frame_len: u32, ) -> Result<Arc<Completion>>
Read a frame from the WAL.
fn should_checkpoint(&self) -> bool
fn checkpoint( &mut self, pager: &Pager, write_counter: Rc<RefCell<usize>>, mode: CheckpointMode, ) -> Result<CheckpointStatus>
fn sync(&mut self) -> Result<WalFsyncStatus>
fn get_max_frame_in_wal(&self) -> u64
fn get_max_frame(&self) -> u64
fn get_min_frame(&self) -> u64
Source§fn current_frame_state(&self) -> (u64, (u32, u32))
fn current_frame_state(&self) -> (u64, (u32, u32))
Returns (current max_frame, current last_checksum) for savepoint capture.
Source§fn rollback_to_frame(
&self,
target_frame: u64,
target_checksum: (u32, u32),
) -> Result<()>
fn rollback_to_frame( &self, target_frame: u64, target_checksum: (u32, u32), ) -> Result<()>
Roll back WAL to a specific target frame (for ROLLBACK TO SAVEPOINT). Read more
Source§fn set_reader_max_frame(&mut self, frame: u64)
fn set_reader_max_frame(&mut self, frame: u64)
Update the reader-visible max frame boundary. Read more
Auto Trait Implementations§
impl !Freeze for WalFile
impl !RefUnwindSafe for WalFile
impl !Send for WalFile
impl !Sync for WalFile
impl !UnwindSafe for WalFile
impl Unpin for WalFile
impl UnsafeUnpin for WalFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more