Skip to content

Commit

Permalink
Merge 'chore: fix typos' from Sonny
Browse files Browse the repository at this point in the history
while reading the code, I saw some typos so just fixing them.

Closes #770
  • Loading branch information
penberg committed Jan 25, 2025
2 parents 3c0d727 + fcd8932 commit 12dd64a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/storage/page_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use super::pager::PageRef;

// In limbo, page cache is shared by default, meaning that multiple frames from WAL can reside in
// the cache, meaning, we need a way to differentiate between pages cached in different
// connections. For this we include the max_frame that will read a connection from so that if two
// connections. For this we include the max_frame that a connection will read from so that if two
// connections have different max_frames, they might or not have different frame read from WAL.
//
// WAL was introduced after Shared cache in SQLite, so this is why these two features don't work
Expand Down
8 changes: 4 additions & 4 deletions core/storage/wal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ pub enum CheckpointStatus {
// min_frame and max_frame is the range of frames that can be safely transferred from WAL to db
// file.
// current_page is a helper to iterate through all the pages that might have a frame in the safe
// range. This is inneficient for now.
// range. This is inefficient for now.
struct OngoingCheckpoint {
page: PageRef,
state: CheckpointState,
Expand Down Expand Up @@ -228,13 +228,13 @@ pub struct WalFileShared {
max_frame: u64,
nbackfills: u64,
// Frame cache maps a Page to all the frames it has stored in WAL in ascending order.
// This is do to easily find the frame it must checkpoint each connection if a checkpoint is
// This is to easily find the frame it must checkpoint each connection if a checkpoint is
// necessary.
// One difference between SQLite and limbo is that we will never support multi process, meaning
// we don't need WAL's index file. So we can do stuff like this without shared memory.
// TODO: this will need refactoring because this is incredible memory inneficient.
// TODO: this will need refactoring because this is incredible memory inefficient.
frame_cache: HashMap<u64, Vec<u64>>,
// Another memory inneficient array made to just keep track of pages that are in frame_cache.
// Another memory inefficient array made to just keep track of pages that are in frame_cache.
pages_in_frames: Vec<u64>,
last_checksum: (u32, u32), // Check of last frame in WAL, this is a cumulative checksum over all frames in the WAL
file: Rc<dyn File>,
Expand Down

0 comments on commit 12dd64a

Please sign in to comment.