Skip to content

Commit

Permalink
Merge pull request #1432 from kianmeng/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
spacejam authored Aug 5, 2023
2 parents d5e6ce8 + 630d79a commit e9c0ae9
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ challenging to understand why something is failing these intense tests.
For better understanding test failures, please:

1. read the failing test name and output log for clues
1. try to reproduce the failed test locally by running its assocated command from the [test script](https://github.com/spacejam/sled/blob/main/.github/workflows/test.yml)
1. try to reproduce the failed test locally by running its associated command from the [test script](https://github.com/spacejam/sled/blob/main/.github/workflows/test.yml)
1. If it is not clear why your test is failing, feel free to request help with understanding it either on discord or requesting help on the PR, and we will do our best to help.

Want to help sled but don't have time for individual contributions? Contribute via [GitHub Sponsors](https://github.com/sponsors/spacejam) to support the people pushing the project forward!
2 changes: 1 addition & 1 deletion SAFETY.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ These hazards can result in the above losses:
* bugs in the GC system
* the old location is overwritten before the defragmented location becomes durable
* bugs in the recovery system
* hardare failures
* hardware failures
* consistency violations may be caused by
* transaction concurrency control failure to enforce linearizability (strict serializability)
* non-linearizable lock-free single-key operations
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ pub(crate) enum Link {
Set(IVec, IVec),
/// The kv pair at a particular index is removed
Del(IVec),
/// A child of this Index node is marked as mergable
/// A child of this Index node is marked as mergeable
ParentMergeIntention(PageId),
/// The merging child has been completely merged into its left sibling
ParentMergeConfirm,
Expand Down
6 changes: 3 additions & 3 deletions src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@ impl Node {
let pid_bytes = self.index_value(idx);
let pid = u64::from_le_bytes(pid_bytes.try_into().unwrap());

log::trace!("index_next_node for key {:?} returning pid {} after seaching node {:?}", key, pid, self);
log::trace!("index_next_node for key {:?} returning pid {} after searching node {:?}", key, pid, self);
(is_leftmost, pid)
}

Expand Down Expand Up @@ -1749,7 +1749,7 @@ impl Inner {
// more idiomatic approach of copying the correct number of bytes into
// a buffer initialized with zeroes. the seemingly "less" unsafe
// approach of using ptr::copy_nonoverlapping did not improve matters.
// using a match statement on offest_bytes and performing simpler
// using a match statement on offset_bytes and performing simpler
// casting for one or two bytes slowed things down due to increasing
// code size. this approach is branch-free and cut CPU usage of this
// function from 7-11% down to 0.5-2% in a monotonic insertion workload.
Expand Down Expand Up @@ -2994,7 +2994,7 @@ mod test {
#[test]
fn node_bug_01() {
// postmortem: hi and lo keys were not properly being accounted in the
// inital allocation
// initial allocation
assert!(prop_indexable(vec![], vec![0], vec![],));
}

Expand Down
2 changes: 1 addition & 1 deletion src/pagecache/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl Log {
}

/// Tries to claim a reservation for writing a buffer to a
/// particular location in stable storge, which may either be
/// particular location in stable storage, which may either be
/// completed or aborted later. Useful for maintaining
/// linearizability across CAS operations that may need to
/// persist part of their operation.
Expand Down
2 changes: 1 addition & 1 deletion src/pagecache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ impl PageCacheInner {

if pid <= COUNTER_PID || pid == BATCH_MANIFEST_PID {
panic!(
"tried to do normal pagecache get on priviledged pid {}",
"tried to do normal pagecache get on privileged pid {}",
pid
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pagecache/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ fn advance_snapshot(
// that point without allocating a new segment
// 4. the recovered tip is at the beginning of a new segment, but without
// any valid messages in it yet. treat as #3 above, but also take care
// in te SA initialization to properly initialize any segment tracking
// in the SA initialization to properly initialize any segment tracking
// state despite not having any pages currently residing there.

let no_recovery_progress = iter.cur_lsn.is_none()
Expand Down
2 changes: 1 addition & 1 deletion src/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ type Senders = Map<usize, (Option<Waker>, SyncSender<OneShot<Option<Event>>>)>;
/// # Ok(())
/// # }
/// ```
/// Aynchronous, non-blocking subscriber:
/// Asynchronous, non-blocking subscriber:
///
/// `Subscription` implements `Future<Output=Option<Event>>`.
///
Expand Down
6 changes: 3 additions & 3 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ impl Tree {
/// should measure the performance impact of
/// using it on realistic sustained workloads
/// running on realistic hardware.
// this clippy check is mis-firing on async code.
// this clippy check is miss-firing on async code.
#[allow(clippy::used_underscore_binding)]
#[allow(clippy::shadow_same)]
pub async fn flush_async(&self) -> Result<usize> {
Expand Down Expand Up @@ -979,7 +979,7 @@ impl Tree {
///
/// `[] < [0] < [255] < [255, 0] < [255, 255] ...`
///
/// To retain the ordering of numerical types use big endian reprensentation
/// To retain the ordering of numerical types use big endian representation
///
/// # Examples
///
Expand Down Expand Up @@ -1030,7 +1030,7 @@ impl Tree {
///
/// `[] < [0] < [255] < [255, 0] < [255, 255] ...`
///
/// To retain the ordering of numerical types use big endian reprensentation
/// To retain the ordering of numerical types use big endian representation
///
/// # Examples
///
Expand Down
6 changes: 3 additions & 3 deletions tests/test_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ fn tree_bug_22() {
#[test]
#[cfg_attr(miri, ignore)]
fn tree_bug_23() {
// postmortem: when rewriting CRC handling code, mis-sized the blob crc
// postmortem: when rewriting CRC handling code, miss-sized the blob crc
prop_tree_matches_btreemap(
vec![Set(Key(vec![6; 5120]), 92), Restart, Scan(Key(vec![]), 35)],
false,
Expand Down Expand Up @@ -2543,8 +2543,8 @@ fn tree_bug_39() {
#[test]
#[cfg_attr(miri, ignore)]
fn tree_bug_40() {
// postmortem: deletions of non-existant keys were
// being persisted despite being unneccessary.
// postmortem: deletions of non-existent keys were
// being persisted despite being unnecessary.
prop_tree_matches_btreemap(
vec![Del(Key(vec![99; 111222333]))],
false,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tree_failpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ fn run_tree_crashes_nicely(ops: Vec<Op>, flusher: bool) -> bool {
continue;
}
// find the last version from a stable batch, if there is one,
// throw away all preceeding versions
// throw away all preceding versions
let committed_find_result = ref_entry.versions.iter().enumerate().rev().find(|(_, ReferenceVersion{ batch, value: _ })| match batch {
Some(batch) => *batch <= stable_batch,
None => false,
Expand Down

0 comments on commit e9c0ae9

Please sign in to comment.