Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinPostma committed Sep 4, 2024
1 parent 8918d29 commit fb082ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libsql-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ struct Cli {
long,
env = "LIBSQL_SYNC_CONCCURENCY",
requires = "sync_from_storage",
default_value = "8",
default_value = "8"
)]
sync_conccurency: usize,
}
Expand Down
2 changes: 1 addition & 1 deletion libsql-wal/src/checkpointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ where
self.errors = 0;
}
}
Some(Err(e)) => panic!("checkoint task panicked: {e}"),
Some(Err(e)) => panic!("checkpoint task panicked: {e}"),
None => unreachable!("got None, but join set is not empty")
}
}
Expand Down
1 change: 0 additions & 1 deletion libsql-wal/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ where
Some(Ok(mut frame)) => {
if stream.peek().await.is_none() {
drop(stream);
frame.header_mut().frame_no();
frame.header_mut().set_size_after(seen.len() as _);
injector.insert_frame(frame).await?;
break;
Expand Down
4 changes: 2 additions & 2 deletions libsql-wal/src/segment/sealed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ where
while let Some((page_no_bytes, offset)) = pages.next() {
let (mut b, ret) = self.read_frame_offset_async(offset as _, buffer).await;
ret?;
// transaction boundaries in a segment are completely erased. The responsibility in on
// the user of the segment to place the transaction boundary such that all frames from
// transaction boundaries in a segment are completely erased. The responsibility is on
// the consumer of the segment to place the transaction boundary such that all frames from
// the segment are applied within the same transaction.
b.get_mut().header_mut().set_size_after(0);
hasher.update(&b.get_ref().as_bytes());
Expand Down

0 comments on commit fb082ac

Please sign in to comment.