diff --git a/src/core/compact_object.cc b/src/core/compact_object.cc index 3973a267a..5d5eeb6b4 100644 --- a/src/core/compact_object.cc +++ b/src/core/compact_object.cc @@ -152,7 +152,7 @@ inline void FreeObjStream(void* ptr) { freeStream((stream*)ptr); } -// Deniel's Lemire function validate_ascii_fast() - under Apache/MIT license. +// Daniel Lemire's function validate_ascii_fast() - under Apache/MIT license. // See https://github.com/lemire/fastvalidate-utf-8/ // The function returns true (1) if all chars passed in src are // 7-bit values (0x00..0x7F). Otherwise, it returns false (0). diff --git a/src/server/conn_context.cc b/src/server/conn_context.cc index 8cf326b0e..791aca334 100644 --- a/src/server/conn_context.cc +++ b/src/server/conn_context.cc @@ -56,7 +56,7 @@ void ConnectionContext::ChangeSubscription(bool to_add, bool to_reply, CmdArgLis unsigned prev = shard_idx[0]; shard_idx[0] = 0; - // compute cumulitive sum, or in other words a beginning index in channels for each shard. + // compute cumulative sum, or in other words a beginning index in channels for each shard. for (size_t i = 1; i < shard_idx.size(); ++i) { unsigned cur = shard_idx[i]; shard_idx[i] = shard_idx[i - 1] + prev; diff --git a/src/server/generic_family_test.cc b/src/server/generic_family_test.cc index b9d5343e6..1fff6a855 100644 --- a/src/server/generic_family_test.cc +++ b/src/server/generic_family_test.cc @@ -180,7 +180,7 @@ TEST_F(GenericFamilyTest, Stick) { ASSERT_THAT(Run({"stick", "b", "d"}), IntArg(1)); ASSERT_THAT(Run({"stick", "c", "d"}), IntArg(0)); - // check stickyness presists during writes + // check stickyness persists during writes Run({"set", "a", "new"}); ASSERT_THAT(Run({"stick", "a"}), IntArg(0)); Run({"append", "a", "-value"}); @@ -190,7 +190,7 @@ TEST_F(GenericFamilyTest, Stick) { Run({"rename", "a", "k"}); ASSERT_THAT(Run({"stick", "k"}), IntArg(0)); - // check rename perists stickyness on multiple shards + // check rename persists stickyness on multiple shards Run({"del", "b"}); string b_val(32, 'b'); string x_val(32, 'x'); diff --git a/src/server/journal/journal_shard.cc b/src/server/journal/journal_shard.cc index fbd0940c3..bae1cbd3b 100644 --- a/src/server/journal/journal_shard.cc +++ b/src/server/journal/journal_shard.cc @@ -71,7 +71,7 @@ std::error_code JournalShard::Open(const std::string_view dir, unsigned index) { // For file integrity guidelines see: // https://lwn.net/Articles/457667/ // https://www.evanjones.ca/durability-filesystem.html - // NOTE: O_DSYNC is omited. + // NOTE: O_DSYNC is omitted. constexpr auto kJournalFlags = O_CLOEXEC | O_CREAT | O_TRUNC | O_RDWR; io::Result> res = uring::OpenLinux(shard_path_, kJournalFlags, 0666); diff --git a/src/server/json_family.cc b/src/server/json_family.cc index d2a12af08..28ac2d561 100644 --- a/src/server/json_family.cc +++ b/src/server/json_family.cc @@ -271,7 +271,7 @@ OpResult> OpToggle(const OpArgs& op_args, string_view key, strin json j = result.value(); error_code ec = JsonReplace(j, path, cb); if (ec) { - VLOG(1) << "Failed to evaulate expression on json with error: " << ec.message(); + VLOG(1) << "Failed to evaluate expression on json with error: " << ec.message(); return OpStatus::SYNTAX_ERR; } @@ -314,7 +314,7 @@ OpResult OpDoubleArithmetic(const OpArgs& op_args, string_view key, stri json j = result.value(); error_code ec = JsonReplace(j, path, cb); if (ec) { - VLOG(1) << "Failed to evaulate expression on json with error: " << ec.message(); + VLOG(1) << "Failed to evaluate expression on json with error: " << ec.message(); return OpStatus::SYNTAX_ERR; } diff --git a/src/server/list_family_test.cc b/src/server/list_family_test.cc index 77f2394dd..ba09b888b 100644 --- a/src/server/list_family_test.cc +++ b/src/server/list_family_test.cc @@ -245,7 +245,7 @@ TEST_F(ListFamilyTest, BLPopSerialize) { // Either this lpush has run first or the one below. // In any case it must be that between 2 invocations of lpush (wrapped in multi) - // blpop will be triggerred and it will empty the list again. Hence, in any case + // blpop will be triggered and it will empty the list again. Hence, in any case // lpush kKey1 here and below should return 1. ASSERT_THAT(resp, ArrLen(11));*/ cl1 = GetDebugInfo("IO1").clock; diff --git a/src/server/malloc_stats.cc b/src/server/malloc_stats.cc index 16f21fb22..22657723b 100644 --- a/src/server/malloc_stats.cc +++ b/src/server/malloc_stats.cc @@ -10,7 +10,7 @@ // This is an internal struct in mimalloc. // To declare it, we must include mimalloc-types.h which is an internal header in the lib. -// Being such it does not interract well with some other c++ headers, therefore we +// Being such it does not interact well with some other c++ headers, therefore we // use a clean cc file to extract data from this record. extern "C" mi_stats_t _mi_stats_main; diff --git a/src/server/rdb_save.cc b/src/server/rdb_save.cc index 6f4f64ac4..a114288fa 100644 --- a/src/server/rdb_save.cc +++ b/src/server/rdb_save.cc @@ -648,7 +648,7 @@ error_code RdbSerializer::SaveString(string_view val) { size_t comprlen, outlen = len; tmp_buf_.resize(outlen + 1); - // Due to stack constrainsts im fibers we can not allow large arrays on stack. + // Due to stack constraints im fibers we can not allow large arrays on stack. // Therefore I am lazily allocating it on heap. It's not fixed in quicklist. if (!lzf_) { lzf_.reset(new LZF_HSLOT[1 << HLOG]); diff --git a/src/server/replica.cc b/src/server/replica.cc index 702d3c6bd..828e581d9 100644 --- a/src/server/replica.cc +++ b/src/server/replica.cc @@ -241,7 +241,7 @@ void Replica::ReplicateFb() { ec = InitiatePSync(); // redis -> df // There is a data race condition in Redis-master code, where "ACK 0" handler may be - // triggerred + // triggered // before Redis is ready to transition to the streaming state and it silenty ignores "ACK // 0". We reduce the chance it happens with this delay. this_fiber::sleep_for(50ms);