diff --git a/src/clients/meta/MetaClient.cpp b/src/clients/meta/MetaClient.cpp index ea2a2864def..352989f6369 100644 --- a/src/clients/meta/MetaClient.cpp +++ b/src/clients/meta/MetaClient.cpp @@ -2375,7 +2375,7 @@ Status MetaClient::authCheckFromCache(const std::string& account, const std::str return Status::Error("User not exist"); } auto lockedSince = userLoginLockTime_[account]; - auto passwordAttemtRemain = userPasswordAttemptsRemain_[account]; + auto passwordAttemptRemain = userPasswordAttemptsRemain_[account]; // If lockedSince is non-zero, it means the account has been locked if (lockedSince != 0) { @@ -2393,7 +2393,7 @@ Status MetaClient::authCheckFromCache(const std::string& account, const std::str // Clear lock state and reset attempts userLoginLockTime_.assign_if_equal(account, lockedSince, 0); userPasswordAttemptsRemain_.assign_if_equal( - account, passwordAttemtRemain, FLAGS_failed_login_attempts); + account, passwordAttemptRemain, FLAGS_failed_login_attempts); } if (iter->second != password) { @@ -2402,14 +2402,14 @@ Status MetaClient::authCheckFromCache(const std::string& account, const std::str return Status::Error("Invalid password"); } - // If the password is not correct and passwordAttemtRemain > 0, - // Allow another attemp - passwordAttemtRemain = userPasswordAttemptsRemain_[account]; - if (passwordAttemtRemain > 0) { - auto newAttemtRemain = passwordAttemtRemain - 1; - userPasswordAttemptsRemain_.assign_if_equal(account, passwordAttemtRemain, newAttemtRemain); - if (newAttemtRemain == 0) { - // If the remaining attemps is 0, failed to authenticate + // If the password is not correct and passwordAttemptRemain > 0, + // Allow another attempt + passwordAttemptRemain = userPasswordAttemptsRemain_[account]; + if (passwordAttemptRemain > 0) { + auto newAttemptRemain = passwordAttemptRemain - 1; + userPasswordAttemptsRemain_.assign_if_equal(account, passwordAttemptRemain, newAttemptRemain); + if (newAttemptRemain == 0) { + // If the remaining attempts is 0, failed to authenticate // Block user login userLoginLockTime_.assign_if_equal(account, 0, time::WallClock::fastNowInSec()); return Status::Error( @@ -2419,8 +2419,8 @@ Status MetaClient::authCheckFromCache(const std::string& account, const std::str account.c_str(), FLAGS_password_lock_time_in_secs); } - LOG(ERROR) << "Invalid password, remaining attempts: " << newAttemtRemain; - return Status::Error("Invalid password, remaining attempts: %d", newAttemtRemain); + LOG(ERROR) << "Invalid password, remaining attempts: " << newAttemptRemain; + return Status::Error("Invalid password, remaining attempts: %d", newAttemptRemain); } } @@ -2540,7 +2540,7 @@ folly::Future> MetaClient::heartbeat() { } // info used in the agent, only set once - // TOOD(spw): if we could add data path(disk) dynamicly in the future, it should be + // TODO(spw): if we could add data path(disk) dynamically in the future, it should be // reported every time it changes if (!dirInfoReported_) { nebula::cpp2::DirInfo dirInfo; diff --git a/src/common/base/Base.h b/src/common/base/Base.h index bb94fbc956e..1e76a93dc14 100644 --- a/src/common/base/Base.h +++ b/src/common/base/Base.h @@ -95,7 +95,7 @@ #define COMPILER_BARRIER() asm volatile("" ::: "memory") #endif // COMPILER_BARRIER -// Formated logging +// Formatted logging #define FLOG_FATAL(...) LOG(FATAL) << folly::stringPrintf(__VA_ARGS__) #define FLOG_ERROR(...) LOG(ERROR) << folly::stringPrintf(__VA_ARGS__) #define FLOG_WARN(...) LOG(WARNING) << folly::stringPrintf(__VA_ARGS__) diff --git a/src/common/base/SignalHandler.cpp b/src/common/base/SignalHandler.cpp index 595fe55962f..f99c6e5c08c 100644 --- a/src/common/base/SignalHandler.cpp +++ b/src/common/base/SignalHandler.cpp @@ -87,7 +87,7 @@ void SignalHandler::doHandle(int sig, siginfo_t *info, void *uctx) { case SIGABRT: // abort case SIGILL: // ill instruction case SIGFPE: // floating point error, e.g. divide by zero - case SIGBUS: // I/O error in mmaped memory, mce error, etc. + case SIGBUS: // I/O error in mmapped memory, mce error, etc. handleFatalSignal(sig, info, uctx); break; case SIGCHLD: diff --git a/src/common/base/SignalHandler.h b/src/common/base/SignalHandler.h index 3d0e699c9ac..80598b8d85b 100644 --- a/src/common/base/SignalHandler.h +++ b/src/common/base/SignalHandler.h @@ -33,7 +33,7 @@ class SignalHandler final { /** * To install one or several signals to handle. * Upon any signal arrives, the corresponding handler would be invoked, - * with an argument holding the informations about the signal and the sender. + * with an argument holding the information about the signal and the sender. * The handler typically prints out the info and do some other things, * e.g. stop the process on SIGTERM. */ diff --git a/src/common/base/test/LoggingBenchmark.cpp b/src/common/base/test/LoggingBenchmark.cpp index ac63a4eae46..bf13506f5b5 100644 --- a/src/common/base/test/LoggingBenchmark.cpp +++ b/src/common/base/test/LoggingBenchmark.cpp @@ -16,7 +16,7 @@ for (int64_t i = 0; i < iters; i++) { \ LOG(INFO) << "Hello" \ << " " \ - << "Wolrd" \ + << "World" \ << "123"; \ } @@ -24,7 +24,7 @@ for (int64_t i = 0; i < iters; i++) { \ XLOG(INFO) << "Hello" \ << " " \ - << "Wolrd" \ + << "World" \ << "123"; \ } diff --git a/src/common/datatypes/test/ValueToJsonTest.cpp b/src/common/datatypes/test/ValueToJsonTest.cpp index a2e8923e2a5..9486ac76eec 100644 --- a/src/common/datatypes/test/ValueToJsonTest.cpp +++ b/src/common/datatypes/test/ValueToJsonTest.cpp @@ -38,7 +38,7 @@ TEST(ValueToJson, vertex) { ASSERT_EQ(expectedTagJson, tag2.toJson()); } - // vertex wtih string vid + // vertex with string vid auto vertexStrVid = Value(Vertex({"Vid", { tag1, diff --git a/src/common/id/test/SegmentIdTest.cpp b/src/common/id/test/SegmentIdTest.cpp index bebe69678e2..78b1c073e8a 100644 --- a/src/common/id/test/SegmentIdTest.cpp +++ b/src/common/id/test/SegmentIdTest.cpp @@ -53,7 +53,7 @@ TEST_F(TestSegmentId, TestConcurrencySmallStep) { } } -// check the result (in the case of no fetchSegment() by useing big step) +// check the result (in the case of no fetchSegment() by using big step) TEST_F(TestSegmentId, TestConcurrencyBigStep) { SegmentId generator = SegmentId(&metaClient_, threadManager_.get()); Status status = generator.init(120000000); diff --git a/src/common/time/TimeUtils.cpp b/src/common/time/TimeUtils.cpp index 0146bffd1d8..ea2f82028ed 100644 --- a/src/common/time/TimeUtils.cpp +++ b/src/common/time/TimeUtils.cpp @@ -202,7 +202,7 @@ StatusOr TimeUtils::toTimestamp(const Value &val) { } else if (kv.first == "microseconds") { d.addMicroseconds(kv.second.getInt()); } else { - return Status::Error("Unkown field %s.", kv.first.c_str()); + return Status::Error("Unknown field %s.", kv.first.c_str()); } } return d; diff --git a/src/daemons/SetupLogging.h b/src/daemons/SetupLogging.h index 2f1764e924a..3caac07cc3b 100644 --- a/src/daemons/SetupLogging.h +++ b/src/daemons/SetupLogging.h @@ -11,7 +11,7 @@ #include "common/base/Status.h" /** * \param exe: program name. - * \return wether successfully setupLogging. + * \return whether successfully setupLogging. * */ nebula::Status setupLogging(const std::string &exe); diff --git a/src/daemons/StandAloneDaemon.cpp b/src/daemons/StandAloneDaemon.cpp index f85b9f4fddc..fc607b8b6be 100644 --- a/src/daemons/StandAloneDaemon.cpp +++ b/src/daemons/StandAloneDaemon.cpp @@ -231,7 +231,7 @@ int main(int argc, char *argv[]) { auto handler = std::make_shared(gMetaKVStore.get(), metaClusterId()); - LOG(INFO) << "The meta deamon start on " << metaLocalhost; + LOG(INFO) << "The meta daemon start on " << metaLocalhost; try { gMetaServer = std::make_unique(); gMetaServer->setPort(FLAGS_meta_port); diff --git a/src/graph/context/ast/CypherAstContext.h b/src/graph/context/ast/CypherAstContext.h index 193996a0a5d..bb89302123b 100644 --- a/src/graph/context/ast/CypherAstContext.h +++ b/src/graph/context/ast/CypherAstContext.h @@ -96,7 +96,7 @@ struct Path final { std::vector edgeInfos; PathBuildExpression* pathBuild{nullptr}; - // True for pattern expresssion, to collect path to list + // True for pattern expression, to collect path to list bool rollUpApply{false}; // vector ["v"] in (v)-[:like]->() std::vector compareVariables; diff --git a/src/graph/executor/admin/ConfigExecutor.cpp b/src/graph/executor/admin/ConfigExecutor.cpp index 1b91e4ff177..a0da15288d5 100644 --- a/src/graph/executor/admin/ConfigExecutor.cpp +++ b/src/graph/executor/admin/ConfigExecutor.cpp @@ -68,7 +68,7 @@ folly::Future SetConfigExecutor::execute() { // Currently, only --session_idle_timeout_secs has a gflag validtor if (module == meta::cpp2::ConfigModule::GRAPH) { // Update local cache before sending request - // Gflag value will be checked in SetCommandLineOption() if the flag validtor is registed + // Gflag value will be checked in SetCommandLineOption() if the flag validtor is registered auto valueStr = meta::GflagsManager::ValueToGflagString(value); if (value.isMap() && value.getMap().kvs.empty()) { // Be compatible with previous configuration diff --git a/src/graph/executor/query/DataCollectExecutor.h b/src/graph/executor/query/DataCollectExecutor.h index b64c8eaa9dc..386862511c4 100644 --- a/src/graph/executor/query/DataCollectExecutor.h +++ b/src/graph/executor/query/DataCollectExecutor.h @@ -11,7 +11,7 @@ // // Member: // `colNames_` : save the column name of the result of the DataCollect -// Funcitons: +// Functions: // `collectSubgraph` : receive result from GetNeighbors, collect vertices & edges by calling // GetNeighborIter's getVertices & getEdges interface // diff --git a/src/graph/executor/query/InnerJoinExecutor.h b/src/graph/executor/query/InnerJoinExecutor.h index 786bbe540e6..714fa306e7c 100644 --- a/src/graph/executor/query/InnerJoinExecutor.h +++ b/src/graph/executor/query/InnerJoinExecutor.h @@ -58,8 +58,8 @@ class InnerJoinExecutor : public JoinExecutor { bool mv_{false}; }; -// No diffrence with inner join in processing data, but the dependencies would be executed in -// paralell. +// No difference with inner join in processing data, but the dependencies would be executed in +// parallel. class HashInnerJoinExecutor final : public InnerJoinExecutor { public: HashInnerJoinExecutor(const PlanNode* node, QueryContext* qctx); diff --git a/src/graph/executor/query/LeftJoinExecutor.h b/src/graph/executor/query/LeftJoinExecutor.h index 37c14ce99e7..1229bd742ac 100644 --- a/src/graph/executor/query/LeftJoinExecutor.h +++ b/src/graph/executor/query/LeftJoinExecutor.h @@ -54,8 +54,8 @@ class LeftJoinExecutor : public JoinExecutor { size_t rightColSize_{0}; }; -// No diffrence with left join in processing data, but the dependencies would be executed in -// paralell. +// No difference with left join in processing data, but the dependencies would be executed in +// parallel. class HashLeftJoinExecutor final : public LeftJoinExecutor { public: HashLeftJoinExecutor(const PlanNode* node, QueryContext* qctx); diff --git a/src/graph/executor/query/TraverseExecutor.h b/src/graph/executor/query/TraverseExecutor.h index c5a62a25fbb..dbdd14d3caf 100644 --- a/src/graph/executor/query/TraverseExecutor.h +++ b/src/graph/executor/query/TraverseExecutor.h @@ -27,7 +27,7 @@ // `paths_` : hash table array, paths_[i] means that the length that paths in the i-th array // element is i // KEY in the hash table : the vid of the destination Vertex -// VALUE in the hash table : collection of paths that destionation vid is `KEY` +// VALUE in the hash table : collection of paths that destination vid is `KEY` // // Functions: // `buildRequestDataSet` : constructs the input DataSet for getNeightbors diff --git a/src/graph/optimizer/rule/CollapseProjectRule.h b/src/graph/optimizer/rule/CollapseProjectRule.h index 0d7866f0315..dc87b83ffce 100644 --- a/src/graph/optimizer/rule/CollapseProjectRule.h +++ b/src/graph/optimizer/rule/CollapseProjectRule.h @@ -21,7 +21,7 @@ namespace opt { // 1. reduce the copy of memory between nodes // 2. reduces expression overhead in some cases(similar to column pruning) // -// Tranformation: +// Transformation: // Before: // // +------------+------------+ diff --git a/src/graph/optimizer/rule/CombineFilterRule.h b/src/graph/optimizer/rule/CombineFilterRule.h index 2b4f7369dd0..4fb4a800677 100644 --- a/src/graph/optimizer/rule/CombineFilterRule.h +++ b/src/graph/optimizer/rule/CombineFilterRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. reduces the expression iterated times // -// Tranformation: +// Transformation: // Before: // // +-----+-----+ diff --git a/src/graph/optimizer/rule/EliminateRowCollectRule.h b/src/graph/optimizer/rule/EliminateRowCollectRule.h index 0725d65f30a..276e179b1a8 100644 --- a/src/graph/optimizer/rule/EliminateRowCollectRule.h +++ b/src/graph/optimizer/rule/EliminateRowCollectRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Delete unnecessary node // -// Tranformation: +// Transformation: // Before: // // +------+------+ diff --git a/src/graph/optimizer/rule/GetEdgesTransformAppendVerticesLimitRule.h b/src/graph/optimizer/rule/GetEdgesTransformAppendVerticesLimitRule.h index 75d1bc01346..37ede26ee46 100644 --- a/src/graph/optimizer/rule/GetEdgesTransformAppendVerticesLimitRule.h +++ b/src/graph/optimizer/rule/GetEdgesTransformAppendVerticesLimitRule.h @@ -26,7 +26,7 @@ namespace opt { // Query example: // 1. match ()-[e]->() return e limit 1 // -// Tranformation: +// Transformation: // Before: // +---------+---------+ // | Project | diff --git a/src/graph/optimizer/rule/GetEdgesTransformRule.h b/src/graph/optimizer/rule/GetEdgesTransformRule.h index 6c06907fe13..e230c687b91 100644 --- a/src/graph/optimizer/rule/GetEdgesTransformRule.h +++ b/src/graph/optimizer/rule/GetEdgesTransformRule.h @@ -27,7 +27,7 @@ namespace opt { // Quey example: // 1. match ()-[e]->() return e limit 3 // -// Tranformation: +// Transformation: // Before: // +---------+---------+ // | Project | diff --git a/src/graph/optimizer/rule/MergeGetNbrsAndDedupRule.h b/src/graph/optimizer/rule/MergeGetNbrsAndDedupRule.h index fe9a9a1526a..2234f6850fc 100644 --- a/src/graph/optimizer/rule/MergeGetNbrsAndDedupRule.h +++ b/src/graph/optimizer/rule/MergeGetNbrsAndDedupRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Delete unnecessary node // -// Tranformation: +// Transformation: // Before: // // +------+-------+ diff --git a/src/graph/optimizer/rule/MergeGetVerticesAndDedupRule.h b/src/graph/optimizer/rule/MergeGetVerticesAndDedupRule.h index 4c882c93e5b..7b141a5c141 100644 --- a/src/graph/optimizer/rule/MergeGetVerticesAndDedupRule.h +++ b/src/graph/optimizer/rule/MergeGetVerticesAndDedupRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Delete unnecessary node // -// Tranformation: +// Transformation: // Before: // // +------+-------+ diff --git a/src/graph/optimizer/rule/MergeGetVerticesAndProjectRule.h b/src/graph/optimizer/rule/MergeGetVerticesAndProjectRule.h index 0aa1bfe0824..9f158259cf8 100644 --- a/src/graph/optimizer/rule/MergeGetVerticesAndProjectRule.h +++ b/src/graph/optimizer/rule/MergeGetVerticesAndProjectRule.h @@ -18,7 +18,7 @@ namespace opt { // expression of GetVertices Benefits: // 1. Delete unnecessary node // -// Tranformation: +// Transformation: // Before: // // +------+-------+ diff --git a/src/graph/optimizer/rule/PushFilterDownAggregateRule.h b/src/graph/optimizer/rule/PushFilterDownAggregateRule.h index bb94a222d49..8ed028a3652 100644 --- a/src/graph/optimizer/rule/PushFilterDownAggregateRule.h +++ b/src/graph/optimizer/rule/PushFilterDownAggregateRule.h @@ -18,7 +18,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +------+------+ diff --git a/src/graph/optimizer/rule/PushFilterDownGetNbrsRule.h b/src/graph/optimizer/rule/PushFilterDownGetNbrsRule.h index 68443238197..bcf633fcd96 100644 --- a/src/graph/optimizer/rule/PushFilterDownGetNbrsRule.h +++ b/src/graph/optimizer/rule/PushFilterDownGetNbrsRule.h @@ -18,7 +18,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +------------------+------------------+ diff --git a/src/graph/optimizer/rule/PushFilterDownInnerJoinRule.h b/src/graph/optimizer/rule/PushFilterDownInnerJoinRule.h index e003e346a75..ad24d71a376 100644 --- a/src/graph/optimizer/rule/PushFilterDownInnerJoinRule.h +++ b/src/graph/optimizer/rule/PushFilterDownInnerJoinRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +-----------+-----------+ diff --git a/src/graph/optimizer/rule/PushFilterDownLeftJoinRule.h b/src/graph/optimizer/rule/PushFilterDownLeftJoinRule.h index d13db43b215..47941a4e01f 100644 --- a/src/graph/optimizer/rule/PushFilterDownLeftJoinRule.h +++ b/src/graph/optimizer/rule/PushFilterDownLeftJoinRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +-----------+-----------+ diff --git a/src/graph/optimizer/rule/PushFilterDownProjectRule.h b/src/graph/optimizer/rule/PushFilterDownProjectRule.h index c69951216d1..781972744e2 100644 --- a/src/graph/optimizer/rule/PushFilterDownProjectRule.h +++ b/src/graph/optimizer/rule/PushFilterDownProjectRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +-------------+-------------+ diff --git a/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h b/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h index a77665bc509..927533cf173 100644 --- a/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h +++ b/src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h @@ -19,7 +19,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +-------------+-------------+ diff --git a/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h index e3aea0b420c..9f5b31ffeda 100644 --- a/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h b/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h index 328dfc3c72a..047fd6d2845 100644 --- a/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h +++ b/src/graph/optimizer/rule/PushLimitDownIndexScanRule.h @@ -19,7 +19,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/optimizer/rule/PushLimitDownProjectRule.h b/src/graph/optimizer/rule/PushLimitDownProjectRule.h index 47a11cace93..c5b3826808d 100644 --- a/src/graph/optimizer/rule/PushLimitDownProjectRule.h +++ b/src/graph/optimizer/rule/PushLimitDownProjectRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h b/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h index 34a19f00b10..a722c61e105 100644 --- a/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h +++ b/src/graph/optimizer/rule/PushLimitDownScanAppendVerticesRule.h @@ -18,7 +18,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h b/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h index ccdb09df09c..a237c1d5ae7 100644 --- a/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h +++ b/src/graph/optimizer/rule/PushLimitDownScanEdgesAppendVerticesRule.h @@ -18,7 +18,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h index 13863147112..88cba4ef3da 100644 --- a/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushStepLimitDownGetNeighborsRule.h @@ -18,7 +18,7 @@ namespace opt { // 1. Limit data early to optimize performance // Query example: // GO 2 STEPS FROM "Tim Duncan" over like YIELD like._dst LIMIT [2,3] -// Tranformation: +// Transformation: // Before: // // +----------+----------+ diff --git a/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h b/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h index dba4bf8c903..1a999a5669d 100644 --- a/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h +++ b/src/graph/optimizer/rule/PushStepSampleDownGetNeighborsRule.h @@ -18,7 +18,7 @@ namespace opt { // 1. Limit data early to optimize performance // Query example: // GO 2 STEPS FROM "Tim Duncan" over like YIELD like._dst SAMPLE [2,3] -// Tranformation: +// Transformation: // Before: // // +----------+----------+ diff --git a/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h b/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h index 00922eab840..05d3d37516a 100644 --- a/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h +++ b/src/graph/optimizer/rule/PushTopNDownIndexScanRule.h @@ -20,7 +20,7 @@ namespace opt { // Benefits: // 1. Limit data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +----------+----------+ diff --git a/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h b/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h index 074f03658a8..8658d06252c 100644 --- a/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h +++ b/src/graph/optimizer/rule/PushVFilterDownScanVerticesRule.h @@ -20,7 +20,7 @@ namespace opt { // Benefits: // 1. Filter data early to optimize performance // -// Tranformation: +// Transformation: // Before: // // +---------+---------+ diff --git a/src/graph/optimizer/rule/RemoveNoopProjectRule.h b/src/graph/optimizer/rule/RemoveNoopProjectRule.h index 0b38d4d8235..d8aa2f6c3c2 100644 --- a/src/graph/optimizer/rule/RemoveNoopProjectRule.h +++ b/src/graph/optimizer/rule/RemoveNoopProjectRule.h @@ -20,7 +20,7 @@ namespace opt { // Benefits: // 1. Remove unnecessary Project node // -// Tranformation: +// Transformation: // Before: // // +---------+---------+ diff --git a/src/graph/optimizer/rule/RemoveProjectDedupBeforeGetDstBySrcRule.h b/src/graph/optimizer/rule/RemoveProjectDedupBeforeGetDstBySrcRule.h index 935bf3ef53d..c20cfe3efb5 100644 --- a/src/graph/optimizer/rule/RemoveProjectDedupBeforeGetDstBySrcRule.h +++ b/src/graph/optimizer/rule/RemoveProjectDedupBeforeGetDstBySrcRule.h @@ -16,7 +16,7 @@ namespace opt { // DataCollect contains only one column that is a deduped vid column which GetDstBySrc needs, // so the following Project and Dedup are useless. // -// Tranformation: +// Transformation: // Before: // // +---------+---------+ diff --git a/src/graph/optimizer/rule/TopNRule.h b/src/graph/optimizer/rule/TopNRule.h index 498c685c4b6..5ae2388e637 100644 --- a/src/graph/optimizer/rule/TopNRule.h +++ b/src/graph/optimizer/rule/TopNRule.h @@ -17,7 +17,7 @@ namespace opt { // Benefits: // 1. Equivalently transform the plan to implement a better topN algorithm at the computing layer // -// Tranformation: +// Transformation: // Before: // // +--------+--------+ diff --git a/src/graph/planner/match/ScanSeek.cpp b/src/graph/planner/match/ScanSeek.cpp index 21a3b46f901..2b73bcd1a65 100644 --- a/src/graph/planner/match/ScanSeek.cpp +++ b/src/graph/planner/match/ScanSeek.cpp @@ -91,7 +91,7 @@ StatusOr ScanSeek::transformNode(NodeContext *nodeCtx) { } } if (prev != nullptr) { - // prev equals to nullptr happend when there are no tags in whole space + // prev equals to nullptr happened when there are no tags in whole space auto *filter = Filter::make(qctx, scanVertices, prev); plan.root = filter; } diff --git a/src/graph/service/GraphService.cpp b/src/graph/service/GraphService.cpp index 1dd0063b42b..adaff15798f 100644 --- a/src/graph/service/GraphService.cpp +++ b/src/graph/service/GraphService.cpp @@ -218,7 +218,7 @@ Status GraphService::auth(const std::string& username, const std::string& passwo return Status::OK(); } - // Authenticate via diffrent auth types + // Authenticate via different auth types if (FLAGS_auth_type == "password") { // Auth with PasswordAuthenticator auto authenticator = std::make_unique(metaClient); diff --git a/src/graph/session/GraphSessionManager.h b/src/graph/session/GraphSessionManager.h index 3c20dd48ab4..066df61d3fd 100644 --- a/src/graph/session/GraphSessionManager.h +++ b/src/graph/session/GraphSessionManager.h @@ -75,7 +75,7 @@ class GraphSessionManager final : public SessionManager { // return: ClientSession which will be found. std::shared_ptr findSessionFromCache(SessionID id); - // Gets all seesions from the local cache. + // Gets all sessions from the local cache. // return: All sessions of the local cache. std::vector getSessionFromLocalCache() const; diff --git a/src/graph/stats/GraphStats.h b/src/graph/stats/GraphStats.h index 2d770582d2c..a1facbbf574 100644 --- a/src/graph/stats/GraphStats.h +++ b/src/graph/stats/GraphStats.h @@ -21,7 +21,7 @@ extern stats::CounterId kNumActiveQueries; extern stats::CounterId kNumSlowQueries; extern stats::CounterId kNumQueryErrors; extern stats::CounterId kNumQueryErrorsLeaderChanges; -// A sequential sentence is treated as multiple sentences seperated by `;` +// A sequential sentence is treated as multiple sentences separated by `;` extern stats::CounterId kNumSentences; extern stats::CounterId kQueryLatencyUs; extern stats::CounterId kSlowQueryLatencyUs; diff --git a/src/graph/util/ExpressionUtils.h b/src/graph/util/ExpressionUtils.h index 6df24c2f823..48cae74ffc7 100644 --- a/src/graph/util/ExpressionUtils.h +++ b/src/graph/util/ExpressionUtils.h @@ -187,7 +187,7 @@ class ExpressionUtils { // Check whether there exists the property of variable expression in `columns' static bool checkVarPropIfExist(const std::vector& columns, const Expression* e); - // Uses the picker to split the given experssion expr into two parts: filterPicked and + // Uses the picker to split the given expression expr into two parts: filterPicked and // filterUnpicked If expr is a non-LogicalAnd expression, applies the picker to expr directly If // expr is a logicalAnd expression, applies the picker to all its operands static void splitFilter(const Expression* expr, diff --git a/src/graph/util/FTIndexUtils.h b/src/graph/util/FTIndexUtils.h index 3266569f96f..fddb1fee3e9 100644 --- a/src/graph/util/FTIndexUtils.h +++ b/src/graph/util/FTIndexUtils.h @@ -22,7 +22,7 @@ class FTIndexUtils final { static StatusOr<::nebula::plugin::ESAdapter> getESAdapter(meta::MetaClient* client); - // Converts TextSearchExpression into a relational expresion that could be pushed down + // Converts TextSearchExpression into a relational expression that could be pushed down static StatusOr rewriteTSFilter(ObjectPool* pool, bool isEdge, Expression* expr, diff --git a/src/graph/util/IdGenerator.h b/src/graph/util/IdGenerator.h index b99cb1f4f20..f376cab15e4 100644 --- a/src/graph/util/IdGenerator.h +++ b/src/graph/util/IdGenerator.h @@ -10,7 +10,7 @@ namespace nebula { namespace graph { -// TODO(Aiee) Remove class and use snowflake id generater instead +// TODO(Aiee) Remove class and use snowflake id generator instead class IdGenerator { public: explicit IdGenerator(int64_t init = 0) : counter_(init) {} diff --git a/src/graph/util/SchemaUtil.h b/src/graph/util/SchemaUtil.h index 0c1a5bd56d9..a19e8882665 100644 --- a/src/graph/util/SchemaUtil.h +++ b/src/graph/util/SchemaUtil.h @@ -61,10 +61,10 @@ class SchemaUtil final { static std::string typeToString(const meta::cpp2::ColumnTypeDef& col); static std::string typeToString(const meta::cpp2::ColumnDef& col); - // Returns the coresponding Value type of the given PropertyType. + // Returns the corresponding Value type of the given PropertyType. static Value::Type propTypeToValueType(nebula::cpp2::PropertyType propType); - // Validates wether the value type matches the ColumnTypeDef. + // Validates whether the value type matches the ColumnTypeDef. static bool isValidVid(const Value& value, const meta::cpp2::ColumnTypeDef& type); static bool isValidVid(const Value& value, nebula::cpp2::PropertyType type); static bool isValidVid(const Value& value); diff --git a/src/graph/validator/LookupValidator.cpp b/src/graph/validator/LookupValidator.cpp index ac636e9f8b1..3d2c07ded17 100644 --- a/src/graph/validator/LookupValidator.cpp +++ b/src/graph/validator/LookupValidator.cpp @@ -173,10 +173,10 @@ Status LookupValidator::validateYield() { NG_RETURN_IF_ERROR(validateYieldTag()); } if (exprProps_.hasInputVarProperty()) { - return Status::SemanticError("unsupport input/variable property expression in yield."); + return Status::SemanticError("unsupported input/variable property expression in yield."); } if (exprProps_.hasSrcDstTagProperty()) { - return Status::SemanticError("unsupport src/dst property expression in yield."); + return Status::SemanticError("unsupported src/dst property expression in yield."); } extractExprProps(); return Status::OK(); diff --git a/src/graph/validator/MatchValidator.cpp b/src/graph/validator/MatchValidator.cpp index dba59f2080c..0abb29431ca 100644 --- a/src/graph/validator/MatchValidator.cpp +++ b/src/graph/validator/MatchValidator.cpp @@ -1154,7 +1154,7 @@ bool extractMultiPathPredicate(Expression *expr, std::vector &pathPre iter++; } } - // Alread remove inner predicate operands + // Already remove inner predicate operands return false; } else { return extractSinglePathPredicate(expr, pathPreds); diff --git a/src/graph/validator/MutateValidator.cpp b/src/graph/validator/MutateValidator.cpp index 84a120e103c..7130c5cae9d 100644 --- a/src/graph/validator/MutateValidator.cpp +++ b/src/graph/validator/MutateValidator.cpp @@ -728,7 +728,7 @@ Status UpdateValidator::getUpdateProps() { return status; } -// Rewrite symbol expresion to fit semantic. +// Rewrite symbol expression to fit semantic. Status UpdateValidator::checkAndResetSymExpr(Expression *inExpr, const std::string &symName, std::string &encodeStr) { diff --git a/src/graph/validator/test/ValidatorTestBase.cpp b/src/graph/validator/test/ValidatorTestBase.cpp index a76c3f89227..21dcfc88c57 100644 --- a/src/graph/validator/test/ValidatorTestBase.cpp +++ b/src/graph/validator/test/ValidatorTestBase.cpp @@ -176,7 +176,7 @@ Status ValidatorTestBase::EqSelf(const PlanNode *l, const PlanNode *r) { return Status::OK(); } default: - LOG(FATAL) << "Unknow plan node kind " << static_cast(l->kind()); + LOG(FATAL) << "Unknown plan node kind " << static_cast(l->kind()); } } diff --git a/src/graph/visitor/PropertyTrackerVisitor.cpp b/src/graph/visitor/PropertyTrackerVisitor.cpp index 2829094f22a..fe66c7983f8 100644 --- a/src/graph/visitor/PropertyTrackerVisitor.cpp +++ b/src/graph/visitor/PropertyTrackerVisitor.cpp @@ -176,7 +176,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { case Expression::Kind::kVarProperty: { // $e.name auto *varPropExpr = static_cast(lhs); auto &edgeAlias = varPropExpr->prop(); - propsUsed_.insertEdgeProp(edgeAlias, unKnowType_, propName); + propsUsed_.insertEdgeProp(edgeAlias, unknownType_, propName); break; } case Expression::Kind::kCase: { // (case xxx).name @@ -200,7 +200,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { if (kind == Expression::Kind::kInputProperty || kind == Expression::Kind::kVarProperty) { auto *propExpr = static_cast(subLeftExpr); auto &edgeAlias = propExpr->prop(); - propsUsed_.insertEdgeProp(edgeAlias, unKnowType_, propName); + propsUsed_.insertEdgeProp(edgeAlias, unknownType_, propName); } else if (kind == Expression::Kind::kListComprehension) { // match (src_v:player{name:"Manu Ginobili"})-[e*2]-(dst_v) return e[0].start_year auto *listExpr = static_cast(subLeftExpr); @@ -208,7 +208,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { if (collectExpr->kind() == Expression::Kind::kInputProperty) { auto *inputPropExpr = static_cast(collectExpr); auto &aliasName = inputPropExpr->prop(); - propsUsed_.insertEdgeProp(aliasName, unKnowType_, propName); + propsUsed_.insertEdgeProp(aliasName, unknownType_, propName); } } else { // normal path @@ -235,7 +235,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { // match (v) return properties(v).name auto *inputPropExpr = static_cast(argExpr); auto &aliasName = inputPropExpr->prop(); - propsUsed_.insertVertexProp(aliasName, unKnowType_, propName); + propsUsed_.insertVertexProp(aliasName, unknownType_, propName); break; } case Expression::Kind::kCase: { // properties(case xxx).name @@ -261,7 +261,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { // match (v)-[e]->(b) return properties(e).start_year auto *propExpr = static_cast(subLeftExpr); auto &aliasName = propExpr->prop(); - propsUsed_.insertEdgeProp(aliasName, unKnowType_, propName); + propsUsed_.insertEdgeProp(aliasName, unknownType_, propName); } else if (leftKind == Expression::Kind::kListComprehension) { // match (v)-[c*2]->(b) return properties(c[0]).start_year // properties([e IN $-.c WHERE is_edge($e)][0]).start_year @@ -270,7 +270,7 @@ void PropertyTrackerVisitor::visit(AttributeExpression *expr) { if (collectExpr->kind() == Expression::Kind::kInputProperty) { auto *inputPropExpr = static_cast(collectExpr); auto &aliasName = inputPropExpr->prop(); - propsUsed_.insertEdgeProp(aliasName, unKnowType_, propName); + propsUsed_.insertEdgeProp(aliasName, unknownType_, propName); } } else { // normal path diff --git a/src/graph/visitor/PropertyTrackerVisitor.h b/src/graph/visitor/PropertyTrackerVisitor.h index b7f10507192..4afee7dd483 100644 --- a/src/graph/visitor/PropertyTrackerVisitor.h +++ b/src/graph/visitor/PropertyTrackerVisitor.h @@ -75,7 +75,7 @@ class PropertyTrackerVisitor : public ExprVisitorImpl { void visit(AggregateExpression* expr) override; const QueryContext* qctx_{nullptr}; - const int unKnowType_{0}; + const int unknownType_{0}; GraphSpaceID space_; PropertyTracker& propsUsed_; std::string entityAlias_; diff --git a/src/graph/visitor/PrunePropertiesVisitor.cpp b/src/graph/visitor/PrunePropertiesVisitor.cpp index 0bc8d43c333..3fe1f349f5d 100644 --- a/src/graph/visitor/PrunePropertiesVisitor.cpp +++ b/src/graph/visitor/PrunePropertiesVisitor.cpp @@ -52,7 +52,7 @@ void PrunePropertiesVisitor::visitCurrent(Project *node) { status_ = extractPropsFromExpr(expr); if (!status_.ok()) { // Project a not exit tag, should not break other columns - // e.g. Vertex tage {{"name", "string"}, {"age", "int64"}} + // e.g. Vertex tag {{"name", "string"}, {"age", "int64"}} // Project "... RETURN v.name, v.xxx.yyy, v.player.age" // v.xxx.yyy should not break v.player.age if (status_.isTagNotFound()) { @@ -176,9 +176,9 @@ void PrunePropertiesVisitor::pruneCurrent(ScanEdges *node) { if (edgeTypeIter != usedEdgeProps.end()) { uniqueProps.insert(edgeTypeIter->second.begin(), edgeTypeIter->second.end()); } - auto unKnowEdgeIter = usedEdgeProps.find(unKnowType_); - if (unKnowEdgeIter != usedEdgeProps.end()) { - uniqueProps.insert(unKnowEdgeIter->second.begin(), unKnowEdgeIter->second.end()); + auto unknownEdgeIter = usedEdgeProps.find(unknownType_); + if (unknownEdgeIter != usedEdgeProps.end()) { + uniqueProps.insert(unknownEdgeIter->second.begin(), unknownEdgeIter->second.end()); } for (auto &prop : props) { if (uniqueProps.find(prop) != uniqueProps.end()) { @@ -239,15 +239,15 @@ void PrunePropertiesVisitor::pruneCurrent(Traverse *node) { if (usedVertexProps.empty()) { node->setVertexProps(nullptr); } else { - auto unknowIter = usedVertexProps.find(unKnowType_); + auto unknownIter = usedVertexProps.find(unknownType_); auto prunedVertexProps = std::make_unique>(); prunedVertexProps->reserve(usedVertexProps.size()); for (auto &vertexProp : *vertexProps) { auto tagId = vertexProp.tag_ref().value(); auto &props = vertexProp.props_ref().value(); std::unordered_set usedProps; - if (unknowIter != usedVertexProps.end()) { - usedProps.insert(unknowIter->second.begin(), unknowIter->second.end()); + if (unknownIter != usedVertexProps.end()) { + usedProps.insert(unknownIter->second.begin(), unknownIter->second.end()); } auto tagIter = usedVertexProps.find(tagId); if (tagIter != usedVertexProps.end()) { @@ -300,9 +300,9 @@ void PrunePropertiesVisitor::pruneCurrent(Traverse *node) { if (edgeTypeIter != usedEdgeProps.end()) { uniqueProps.insert(edgeTypeIter->second.begin(), edgeTypeIter->second.end()); } - auto unKnowEdgeIter = usedEdgeProps.find(unKnowType_); - if (unKnowEdgeIter != usedEdgeProps.end()) { - uniqueProps.insert(unKnowEdgeIter->second.begin(), unKnowEdgeIter->second.end()); + auto unknownEdgeIter = usedEdgeProps.find(unknownType_); + if (unknownEdgeIter != usedEdgeProps.end()) { + uniqueProps.insert(unknownEdgeIter->second.begin(), unknownEdgeIter->second.end()); } for (auto &prop : props) { if (uniqueProps.find(prop) != uniqueProps.end()) { @@ -394,15 +394,15 @@ void PrunePropertiesVisitor::pruneCurrent(AppendVertices *node) { } return; } - auto unknowIter = usedVertexProps.find(unKnowType_); + auto unknownIter = usedVertexProps.find(unknownType_); prunedVertexProps->reserve(usedVertexProps.size()); for (auto &vertexProp : *vertexProps) { auto tagId = vertexProp.tag_ref().value(); auto &props = vertexProp.props_ref().value(); auto tagIter = usedVertexProps.find(tagId); std::unordered_set usedProps; - if (unknowIter != usedVertexProps.end()) { - usedProps.insert(unknowIter->second.begin(), unknowIter->second.end()); + if (unknownIter != usedVertexProps.end()) { + usedProps.insert(unknownIter->second.begin(), unknownIter->second.end()); } if (tagIter != usedVertexProps.end()) { usedProps.insert(tagIter->second.begin(), tagIter->second.end()); diff --git a/src/graph/visitor/PrunePropertiesVisitor.h b/src/graph/visitor/PrunePropertiesVisitor.h index 98c6fe9e638..04a2160accf 100644 --- a/src/graph/visitor/PrunePropertiesVisitor.h +++ b/src/graph/visitor/PrunePropertiesVisitor.h @@ -84,7 +84,7 @@ class PrunePropertiesVisitor final : public PlanNodeVisitor { GraphSpaceID spaceID_; Status status_; bool rootNode_{true}; - const int unKnowType_ = 0; + const int unknownType_ = 0; }; } // namespace graph diff --git a/src/graph/visitor/test/ExtractFilterExprVisitorTest.cpp b/src/graph/visitor/test/ExtractFilterExprVisitorTest.cpp index 25e409d30d3..c7b1a9c07d8 100644 --- a/src/graph/visitor/test/ExtractFilterExprVisitorTest.cpp +++ b/src/graph/visitor/test/ExtractFilterExprVisitorTest.cpp @@ -450,7 +450,7 @@ TEST_F(ExtractFilterExprVisitorTest, TestMultiCanNotPush) { // expect: can not push // expect expr: A1 or (A2 and (A3 or (A4 and B1))) or B2 // remain: nullptr - // comment: has been splitted, however, the total expr can not push + // comment: has been split, however, the total expr can not push std::vector A, B; getExprVec(A, B, 4, 2); diff --git a/src/graph/visitor/test/ExtractGroupSuiteVisitorTest.cpp b/src/graph/visitor/test/ExtractGroupSuiteVisitorTest.cpp index eea0e3fe7af..76693a97b3f 100644 --- a/src/graph/visitor/test/ExtractGroupSuiteVisitorTest.cpp +++ b/src/graph/visitor/test/ExtractGroupSuiteVisitorTest.cpp @@ -170,7 +170,7 @@ TEST_F(ExtractGroupSuiteVisitorTest, TestArithmeticExpression2) { } TEST_F(ExtractGroupSuiteVisitorTest, TestRelationalExpression) { - // e.egde + count(a) + avg(b.name) + // e.edge + count(a) + avg(b.name) auto* e1 = laExpr("e", "edge"); auto* e2 = aggExpr("count", labelExpr("a"), false); auto* e3 = aggExpr("avg", laExpr("b", "name"), false); diff --git a/src/kvstore/Common.h b/src/kvstore/Common.h index 0ebeefb5e2c..6e8df267da4 100644 --- a/src/kvstore/Common.h +++ b/src/kvstore/Common.h @@ -221,7 +221,7 @@ struct Peers { folly::split("\n", str, lines, true); if (lines.size() < 1) { - LOG(INFO) << "Bad format peers data, emtpy data"; + LOG(INFO) << "Bad format peers data, empty data"; return peers; } diff --git a/src/kvstore/DiskManager.h b/src/kvstore/DiskManager.h index 41dfbceec74..15e1bc24407 100644 --- a/src/kvstore/DiskManager.h +++ b/src/kvstore/DiskManager.h @@ -37,7 +37,7 @@ class DiskManager { * @brief Construct a new Disk Manager object * * @param dataPaths `data_path` in configuration - * @param bgThread Backgournd thread to refresh remaining spaces of each data path + * @param bgThread Background thread to refresh remaining spaces of each data path */ DiskManager(const std::vector& dataPaths, std::shared_ptr bgThread = nullptr); @@ -66,7 +66,7 @@ class DiskManager { StatusOr path(GraphSpaceID spaceId, PartitionID partId) const; /** - * @brief Add a partition to a given path, called when add a partiton in NebulaStore + * @brief Add a partition to a given path, called when add a partition in NebulaStore * @pre Path is the space path, so it must end with /nebula/spaceId and path must exists * * @param spaceId @@ -76,7 +76,7 @@ class DiskManager { void addPartToPath(GraphSpaceID spaceId, PartitionID partId, const std::string& path); /** - * @brief Remove a partition form a given path, called when remove a partiton in NebulaStore + * @brief Remove a partition form a given path, called when remove a partition in NebulaStore * @pre Path is the space path, so it must end with /nebula/spaceId and path must exists * * @param spaceId diff --git a/src/kvstore/EventListener.h b/src/kvstore/EventListener.h index 0076efcb881..696e541ebf4 100644 --- a/src/kvstore/EventListener.h +++ b/src/kvstore/EventListener.h @@ -102,7 +102,7 @@ class EventListener : public rocksdb::EventListener { * @brief A callback function for RocksDB which will be called before a memtable is made * immutable. * - * @param info MemTable informations passed by rocksdb + * @param info MemTable information passed by rocksdb */ void OnMemTableSealed(const rocksdb::MemTableInfo& info) override { VLOG(3) << "MemTable Sealed column family: " << info.cf_name @@ -125,7 +125,7 @@ class EventListener : public rocksdb::EventListener { * using IngestExternalFile. * * @param db Rocksdb instance - * @param info Ingest infomations passed by rocksdb + * @param info Ingest information passed by rocksdb */ void OnExternalFileIngested(rocksdb::DB* db, const rocksdb::ExternalFileIngestionInfo& info) override { @@ -178,7 +178,7 @@ class EventListener : public rocksdb::EventListener { * @param info Information when write a rocksdb file */ void OnFileWriteFinish(const rocksdb::FileOperationInfo& info) override { - VLOG(4) << "Writeing file finished: file path is " << info.path << " offset: " << info.offset + VLOG(4) << "Writing file finished: file path is " << info.path << " offset: " << info.offset << " length: " << info.length; } diff --git a/src/kvstore/KVStore.h b/src/kvstore/KVStore.h index c1d42074009..f76b6d29112 100644 --- a/src/kvstore/KVStore.h +++ b/src/kvstore/KVStore.h @@ -144,8 +144,8 @@ class KVStore { * @param keys Keys to read * @param values Pointers of value * @param canReadFromFollower - * @return Return std::vector when suceeded: Result status of each key, if key[i] does not - * exist, the i-th value in return value would be Status::KeyNotFound. Return ErrorCode when + * @return Return std::vector when succeeded: Result status of each key, if key[i] does + * not exist, the i-th value in return value would be Status::KeyNotFound. Return ErrorCode when * failed */ virtual std::pair> multiGet( @@ -275,7 +275,7 @@ class KVStore { KVCallback cb) = 0; /** - * @brief Remove multible keys from kvstore asynchronously + * @brief Remove multiple keys from kvstore asynchronously * * @param spaceId * @param partId @@ -339,7 +339,7 @@ class KVStore { virtual nebula::cpp2::ErrorCode ingest(GraphSpaceID spaceId) = 0; /** - * @brief Retrive the leader distribution + * @brief Retrieve the leader distribution * * @param leaderIds The leader address of all partitions * @return int32_t The leader count of all spaces @@ -352,7 +352,7 @@ class KVStore { * * @param spaceId * @param partId - * @return ErrorOr> Return the part if succeeed, + * @return ErrorOr> Return the part if succeeded, * else return ErrorCode */ virtual ErrorOr> part(GraphSpaceID spaceId, @@ -454,7 +454,7 @@ class KVStore { virtual std::vector getDataRoot() const = 0; /** - * @brief Get the kvstore propery, only used in rocksdb + * @brief Get the kvstore property, only used in rocksdb * * @param spaceId * @param property Property name diff --git a/src/kvstore/LogEncoder.h b/src/kvstore/LogEncoder.h index 88ef21f70bc..c97694e988b 100644 --- a/src/kvstore/LogEncoder.h +++ b/src/kvstore/LogEncoder.h @@ -205,7 +205,7 @@ class BatchHolder : public boost::noncopyable, public nebula::cpp::NonMovable { } /** - * @brief size of key in operaion of the batch, in bytes + * @brief size of key in operation of the batch, in bytes */ size_t size() { return size_; diff --git a/src/kvstore/NebulaStore.cpp b/src/kvstore/NebulaStore.cpp index d9a4a5a9166..6eaa674a518 100644 --- a/src/kvstore/NebulaStore.cpp +++ b/src/kvstore/NebulaStore.cpp @@ -618,7 +618,7 @@ std::shared_ptr NebulaStore::newListener(GraphSpaceID spaceId, const std::vector& peers) { // Lock has been acquired in addListenerPart. // todo(doodle): we don't support start multiple type of listener in same process for now. If we - // suppport it later, the wal path may or may not need to be separated depending on how we + // support it later, the wal path may or may not need to be separated depending on how we // implement it. auto walPath = folly::stringPrintf("%s/%d/%d/wal", options_.listenerPath_.c_str(), spaceId, partId); diff --git a/src/kvstore/NebulaStore.h b/src/kvstore/NebulaStore.h index 17921afd396..15b92a9135c 100644 --- a/src/kvstore/NebulaStore.h +++ b/src/kvstore/NebulaStore.h @@ -232,8 +232,8 @@ class NebulaStore : public KVStore, public Handler { * @param keys Keys to read * @param values Pointers of value * @param canReadFromFollower Whether check if current kvstore is leader of given partition - * @return Return std::vector when suceeded: Result status of each key, if key[i] does not - * exist, the i-th value in return value would be Status::KeyNotFound. Return ErrorCode when + * @return Return std::vector when succeeded: Result status of each key, if key[i] does + * not exist, the i-th value in return value would be Status::KeyNotFound. Return ErrorCode when * failed */ std::pair> multiGet( @@ -362,7 +362,7 @@ class NebulaStore : public KVStore, public Handler { KVCallback cb) override; /** - * @brief Remove multible keys from kvstore asynchronously + * @brief Remove multiple keys from kvstore asynchronously * * @param spaceId * @param partId @@ -422,7 +422,7 @@ class NebulaStore : public KVStore, public Handler { * * @param spaceId * @param partId - * @return ErrorOr> Return the part if succeeed, + * @return ErrorOr> Return the part if succeeded, * else return ErrorCode */ ErrorOr> part(GraphSpaceID spaceId, @@ -513,7 +513,7 @@ class NebulaStore : public KVStore, public Handler { nebula::cpp2::ErrorCode setWriteBlocking(GraphSpaceID spaceId, bool sign) override; /** - * @brief Whether is leader of given partiton or not + * @brief Whether is leader of given partition or not * * @param spaceId * @param partId @@ -525,7 +525,7 @@ class NebulaStore : public KVStore, public Handler { * * @param spaceId * @return ErrorOr> Return space part info - * when succeed, return Errorcode when faile + * when succeed, return Errorcode when failed */ ErrorOr> space(GraphSpaceID spaceId); @@ -534,7 +534,7 @@ class NebulaStore : public KVStore, public Handler { * * @param spaceId * @return ErrorOr> Return space - * listener info when succeed, return Errorcode when faile + * listener info when succeed, return Errorcode when failed */ ErrorOr> spaceListener( GraphSpaceID spaceId); @@ -586,7 +586,7 @@ class NebulaStore : public KVStore, public Handler { void removePart(GraphSpaceID spaceId, PartitionID partId, bool needLock = true) override; /** - * @brief Retrive the leader distribution + * @brief Retrieve the leader distribution * * @param leaderIds The leader address of all partitions * @return int32_t The leader count of all spaces @@ -698,7 +698,7 @@ class NebulaStore : public KVStore, public Handler { std::unique_ptr batch) override; /** - * @brief Get the kvstore propery, only used in rocksdb + * @brief Get the kvstore property, only used in rocksdb * * @param spaceId * @param property Property name diff --git a/src/kvstore/Part.h b/src/kvstore/Part.h index 72dc9433af8..24019ed60bf 100644 --- a/src/kvstore/Part.h +++ b/src/kvstore/Part.h @@ -92,7 +92,7 @@ class Part : public raftex::RaftPart { void asyncRemove(folly::StringPiece key, KVCallback cb); /** - * @brief Remove multible keys from kvstore asynchronously + * @brief Remove multiple keys from kvstore asynchronously * * @param key Keys to remove * @param cb Callback when has a result diff --git a/src/kvstore/PartManager.h b/src/kvstore/PartManager.h index 65a1365eece..a4ef3df6c97 100644 --- a/src/kvstore/PartManager.h +++ b/src/kvstore/PartManager.h @@ -131,7 +131,7 @@ class Handler { const std::vector& remoteListeners) = 0; /** - * @brief Retrive the leader distribution + * @brief Retrieve the leader distribution * * @param leaderIds The leader address of all partitions * @return int32_t The leader count of all spaces @@ -206,13 +206,13 @@ class PartManager { * * @param spaceId * @param partId - * @return StatusOr> Remote listener infomations + * @return StatusOr> Remote listener information */ virtual StatusOr> listenerPeerExist(GraphSpaceID spaceId, PartitionID partId) = 0; /** - * @brief Register a handler to part mananger, e.g. NebulaStore + * @brief Register a handler to part manager, e.g. NebulaStore * * @param handler */ @@ -356,7 +356,7 @@ class MemPartManager final : public PartManager { * * @param spaceId * @param partId - * @return StatusOr> Remote listener infomations + * @return StatusOr> Remote listener information */ StatusOr> listenerPeerExist(GraphSpaceID spaceId, PartitionID partId) override; @@ -368,13 +368,13 @@ class MemPartManager final : public PartManager { }; /** - * @brief Part mananger based on meta client and server, all interfaces will read from meta client + * @brief Part manager based on meta client and server, all interfaces will read from meta client * cache or meta server */ class MetaServerBasedPartManager : public PartManager, public meta::MetaChangedListener { public: /** - * @brief Construct a new part mananger based on meta + * @brief Construct a new part manager based on meta * * @param host Local address * @param client Meta client @@ -433,11 +433,11 @@ class MetaServerBasedPartManager : public PartManager, public meta::MetaChangedL * * @param spaceId * @param partId - * @return StatusOr> Remote listener infomations + * @return StatusOr> Remote listener information */ StatusOr> listenerPeerExist(GraphSpaceID spaceId, PartitionID partId) override; - // Folloing methods implement the interfaces in MetaChangedListener + // Following methods implement the interfaces in MetaChangedListener /** * @brief Found a new space, call handler's method * @@ -454,7 +454,7 @@ class MetaServerBasedPartManager : public PartManager, public meta::MetaChangedL void onSpaceRemoved(GraphSpaceID spaceId) override; /** - * @brief Found space option updated, call handler's methos + * @brief Found space option updated, call handler's method * * @param spaceId * @param options Options map @@ -540,7 +540,7 @@ class MetaServerBasedPartManager : public PartManager, public meta::MetaChangedL meta::cpp2::ListenerType type) override; /** - * @brief Check if a parition has remote listeners, add or remove if necessary + * @brief Check if a partition has remote listeners, add or remove if necessary * * @param spaceId * @param partId diff --git a/src/kvstore/RocksEngine.h b/src/kvstore/RocksEngine.h index caaaefbcb0a..e4be3f1a5b9 100644 --- a/src/kvstore/RocksEngine.h +++ b/src/kvstore/RocksEngine.h @@ -177,7 +177,7 @@ class RocksEngine : public KVEngine { * @brief Construct a new rocksdb instance * * @param spaceId - * @param vIdLen Vertex id length, used for perfix bloom filter + * @param vIdLen Vertex id length, used for prefix bloom filter * @param dataPath Rocksdb data path * @param walPath Rocksdb wal path * @param mergeOp Rocksdb merge operation @@ -392,7 +392,7 @@ class RocksEngine : public KVEngine { * Non-data operation ********************/ /** - * @brief Write the part key into rocksdb for persistance + * @brief Write the part key into rocksdb for persistence * * @param partId * @param raftPeers partition raft peers, including peers created during balance which are not in @@ -424,7 +424,7 @@ class RocksEngine : public KVEngine { std::vector allParts() override; /** - * @brief Retrun all the balancing part->raft peers in rocksdb engine by scanning system part key. + * @brief Return all the balancing part->raft peers in rocksdb engine by scanning system part key. * * @return std::map */ diff --git a/src/kvstore/listener/Listener.h b/src/kvstore/listener/Listener.h index 9df8672b7f1..fbb53a54425 100644 --- a/src/kvstore/listener/Listener.h +++ b/src/kvstore/listener/Listener.h @@ -169,7 +169,7 @@ class Listener : public raftex::RaftPart { virtual void init() = 0; /** - * @brief Get last apply id from persistance storage, used in initialization + * @brief Get last apply id from persistence storage, used in initialization * * @return LogID Last apply log id */ diff --git a/src/kvstore/listener/elasticsearch/ESListener.cpp b/src/kvstore/listener/elasticsearch/ESListener.cpp index b1562c405c0..f9119fd01a7 100644 --- a/src/kvstore/listener/elasticsearch/ESListener.cpp +++ b/src/kvstore/listener/elasticsearch/ESListener.cpp @@ -285,7 +285,7 @@ void ESListener::processLogs() { case OP_BATCH_WRITE: { auto batchData = decodeBatchValue(log); for (auto& op : batchData) { - // OP_BATCH_REMOVE and OP_BATCH_REMOVE_RANGE is igored + // OP_BATCH_REMOVE and OP_BATCH_REMOVE_RANGE is ignored switch (op.first) { case BatchLogType::OP_BATCH_PUT: { batch.put(op.second.first.toString(), op.second.second.toString()); diff --git a/src/kvstore/listener/elasticsearch/ESListener.h b/src/kvstore/listener/elasticsearch/ESListener.h index dac218e9f0b..33073f4eb96 100644 --- a/src/kvstore/listener/elasticsearch/ESListener.h +++ b/src/kvstore/listener/elasticsearch/ESListener.h @@ -62,14 +62,14 @@ class ESListener : public Listener { bool persist(LogID lastId, TermID lastTerm, LogID lastApplyLogId) override; /** - * @brief Get commit log id and commit log term from persistance storage, called in start() + * @brief Get commit log id and commit log term from persistence storage, called in start() * * @return std::pair */ std::pair lastCommittedLogId() override; /** - * @brief Get last apply id from persistance storage, used in initialization + * @brief Get last apply id from persistence storage, used in initialization * * @return LogID Last apply log id */ diff --git a/src/kvstore/listener/test/NebulaListenerTest.cpp b/src/kvstore/listener/test/NebulaListenerTest.cpp index 34714b8165b..4090f8051e6 100644 --- a/src/kvstore/listener/test/NebulaListenerTest.cpp +++ b/src/kvstore/listener/test/NebulaListenerTest.cpp @@ -171,7 +171,7 @@ class DummyListener : public Listener { case OP_BATCH_WRITE: { auto batchData = decodeBatchValue(log); for (auto& op : batchData) { - // OP_BATCH_REMOVE and OP_BATCH_REMOVE_RANGE is igored + // OP_BATCH_REMOVE and OP_BATCH_REMOVE_RANGE is ignored switch (op.first) { case BatchLogType::OP_BATCH_PUT: { batch.put(op.second.first.toString(), op.second.second.toString()); diff --git a/src/kvstore/raftex/Host.cpp b/src/kvstore/raftex/Host.cpp index 499752f846e..826bb0e4e2c 100644 --- a/src/kvstore/raftex/Host.cpp +++ b/src/kvstore/raftex/Host.cpp @@ -210,7 +210,7 @@ void Host::appendLogsInternal(folly::EventBase* eb, std::shared_ptrpromise_.setValue(resp); // Check if there are any pending request: - // Eithor send pending requst if any, or set Host to vacant + // Either send pending request if any, or set Host to vacant newReq = self->getPendingReqIfAny(self); } } diff --git a/src/kvstore/raftex/Host.h b/src/kvstore/raftex/Host.h index 97fb388f735..0f5f481849a 100644 --- a/src/kvstore/raftex/Host.h +++ b/src/kvstore/raftex/Host.h @@ -26,7 +26,7 @@ class RaftPart; /** * @brief Host is a class to monitor how many log has been sent to a raft peer. It will send logs or - * start elelction to the remote peer by rpc + * start election to the remote peer by rpc */ class Host final : public std::enable_shared_from_this { friend class RaftPart; diff --git a/src/kvstore/raftex/RaftPart.cpp b/src/kvstore/raftex/RaftPart.cpp index 781db5f24fd..ff3909b3970 100644 --- a/src/kvstore/raftex/RaftPart.cpp +++ b/src/kvstore/raftex/RaftPart.cpp @@ -52,14 +52,14 @@ using nebula::wal::FileBasedWalPolicy; using OpProcessor = folly::Function(AtomicOp op)>; /** - * @brief code to describle if a log can be merged with others + * @brief code to describe if a log can be merged with others * NO_MERGE: can't merge with any other * MERGE_NEXT: can't previous logs, can merge with next. (has to be head) * MERGE_PREV: can merge with previous, can't merge any more. (has to be tail) * MERGE_BOTH: can merge with any other * * Normal / heartbeat will always be MERGE_BOTH - * Command will alwayse be MERGE_PREV + * Command will always be MERGE_PREV * ATOMIC_OP can be either MERGE_NEXT or MERGE_BOTH * depends on if it read a key in write set. * no log type will judge as NO_MERGE @@ -1034,7 +1034,7 @@ void RaftPart::processAppendLogResponses(const AppendLogResponses& resps, // here, but this will make caller believe this append failed // however, this log is replicated to followers(written in WAL) // and those followers may become leader (use that WAL) - // which means this log may actully commit succeeded. + // which means this log may actually commit succeeded. res = nebula::cpp2::ErrorCode::E_RAFT_UNKNOWN_APPEND_LOG; } } @@ -1074,7 +1074,7 @@ void RaftPart::processAppendLogResponses(const AppendLogResponses& resps, As for leader, we did't acquire raftLock because it would block heartbeat. Instead, we protect the partition by the logsLock_, there won't be another out-going logs. So the third parameters need to be true, we would grab the lock for some special operations. Besides, - leader neet to wait all logs applied to state machine, so the second parameters need to be + leader need to wait all logs applied to state machine, so the second parameters need to be true so the second parameters need to be true. */ auto [code, lastCommitId, lastCommitTerm] = commitLogs(std::move(walIt), true, true); @@ -1517,7 +1517,7 @@ void RaftPart::processAskForVoteRequest(const cpp2::AskForVoteRequest& req, resp.current_term_ref() = term_; } else if (req.get_is_pre_vote() && req.get_term() - 1 > term_) { // req.get_term() - 1 > term_ in prevote, update term and convert to follower. - // we need to substract 1 because the candidate's actaul term is req.term() - 1 + // we need to subtract 1 because the candidate's actual term is req.term() - 1 term_ = req.get_term() - 1; role_ = Role::FOLLOWER; leader_ = HostAddr("", 0); @@ -1679,7 +1679,7 @@ void RaftPart::processAppendLogRequest(const cpp2::AppendLogRequest& req, // 3. My log term on req.last_log_id_sent is not same as req.last_log_term_sent // todo(doodle): One of the most common case when req.get_last_log_id_sent() < committedLogId_ // is that leader timeout, and retry with same request, but follower has received it - // previously in fact. There are two choise: ask leader to send logs after committedLogId_ or + // previously in fact. There are two choices: ask leader to send logs after committedLogId_ or // just do nothing. if (req.get_last_log_id_sent() < committedLogId_ || wal_->lastLogId() < req.get_last_log_id_sent()) { @@ -1700,7 +1700,7 @@ void RaftPart::processAppendLogRequest(const cpp2::AppendLogRequest& req, */ if (req.get_last_log_id_sent() == committedLogId_ && req.get_last_log_term_sent() == committedLogTerm_) { - // Logs are matched of at log index of committedLogId_, and we could check remaing wal if + // remaining // there are any. // The first log of wal must be committedLogId_ + 1, it can't be 0 (no wal) as well // because it has been checked by case 2 @@ -1750,7 +1750,7 @@ void RaftPart::processAppendLogRequest(const cpp2::AppendLogRequest& req, numLogs = numLogs - diffIndex; } - // happy path or a difference is found: append remaing logs + // happy path or a difference is found: append remaining logs auto logEntries = std::vector( std::make_move_iterator(req.get_log_str_list().begin() + diffIndex), std::make_move_iterator(req.get_log_str_list().end())); @@ -2180,7 +2180,7 @@ void RaftPart::reset() { lastLogTerm_ = committedLogTerm_ = 0; } -nebula::cpp2::ErrorCode RaftPart::isCatchedUp(const HostAddr& peer) { +nebula::cpp2::ErrorCode RaftPart::isCaughtUp(const HostAddr& peer) { std::lock_guard lck(raftLock_); VLOG(2) << idStr_ << "Check whether I catch up"; if (role_ != Role::LEADER) { diff --git a/src/kvstore/raftex/RaftPart.h b/src/kvstore/raftex/RaftPart.h index f2a33b2206d..11c7825c143 100644 --- a/src/kvstore/raftex/RaftPart.h +++ b/src/kvstore/raftex/RaftPart.h @@ -284,13 +284,13 @@ class RaftPart : public std::enable_shared_from_this { folly::Future sendCommandAsync(std::string log); /** - * @brief Check if the peer has catched up data from leader. If leader is sending the + * @brief Check if the peer has caught up data from leader. If leader is sending the * snapshot, the method will return false. * - * @param peer The peer to check if it has catched up + * @param peer The peer to check if it has caught up * @return nebula::cpp2::ErrorCode */ - nebula::cpp2::ErrorCode isCatchedUp(const HostAddr& peer); + nebula::cpp2::ErrorCode isCaughtUp(const HostAddr& peer); /** * @brief Hard link the wal files to a new path @@ -601,7 +601,7 @@ class RaftPart : public std::enable_shared_from_this { * @brief Verify if the request can be accepted when receiving a AppendLog or Heartbeat request * * @tparam REQ AppendLogRequest or HeartbeatRequest - * @param req RPC requeset + * @param req RPC request * @return nebula::cpp2::ErrorCode */ template @@ -752,7 +752,7 @@ class RaftPart : public std::enable_shared_from_this { * * @param resps Responses of peers * @param eb The eventbase when sent request, used for retry and continue as well - * @param iter Log iterator, also used for continue to replicate remaing logs + * @param iter Log iterator, also used for continue to replicate remaining logs * @param currTerm The term when building the iterator * @param lastLogId The last log id in iterator * @param committedId The commit log id diff --git a/src/kvstore/raftex/test/RaftCase.cpp b/src/kvstore/raftex/test/RaftCase.cpp index f5f7f6b1eaf..55d85f66b32 100644 --- a/src/kvstore/raftex/test/RaftCase.cpp +++ b/src/kvstore/raftex/test/RaftCase.cpp @@ -143,8 +143,8 @@ TEST_F(ThreeRaftTest, LeaderCrashRebootWithLogs) { LOG(INFO) << "<===== Done LeaderNetworkFailure test"; } -TEST_F(ThreeRaftTest, Persistance) { - LOG(INFO) << "=====> Start persistance test"; +TEST_F(ThreeRaftTest, Persistence) { + LOG(INFO) << "=====> Start persistence test"; LOG(INFO) << "=====> Now let's kill random copy"; std::vector msgs; @@ -164,7 +164,7 @@ TEST_F(ThreeRaftTest, Persistance) { } sleep(FLAGS_raft_heartbeat_interval_secs); checkConsensus(copies_, 0, 9, msgs); - LOG(INFO) << "<===== Done persistance test"; + LOG(INFO) << "<===== Done persistence test"; } // this ut will lead to crash in some case, see issue #685 diff --git a/src/kvstore/wal/AtomicLogBuffer.h b/src/kvstore/wal/AtomicLogBuffer.h index 1e23e14c875..db66d87b955 100644 --- a/src/kvstore/wal/AtomicLogBuffer.h +++ b/src/kvstore/wal/AtomicLogBuffer.h @@ -335,7 +335,7 @@ class AtomicLogBuffer : public std::enable_shared_from_this { Node* seek(LogID logId); /** - * @brief Add a refernce count of how many iterator exists + * @brief Add a reference count of how many iterator exists * * @return int32_t Reference count */ diff --git a/src/kvstore/wal/FileBasedWal.h b/src/kvstore/wal/FileBasedWal.h index 925a46c83bd..cd4608ee443 100644 --- a/src/kvstore/wal/FileBasedWal.h +++ b/src/kvstore/wal/FileBasedWal.h @@ -61,7 +61,7 @@ class FileBasedWal final : public Wal, public std::enable_shared_from_this */ @@ -111,7 +111,7 @@ class FileBasedWal final : public Wal, public std::enable_shared_from_this spaceFilter( diff --git a/src/meta/processors/BaseProcessor.h b/src/meta/processors/BaseProcessor.h index 9f56934f955..ab9ba89937c 100644 --- a/src/meta/processors/BaseProcessor.h +++ b/src/meta/processors/BaseProcessor.h @@ -76,7 +76,7 @@ class BaseProcessor { } /** - * @brief Set leader address to reponse. + * @brief Set leader address to response. * */ void handleLeaderChanged() { @@ -345,7 +345,7 @@ class BaseProcessor { const std::vector& alterItems); /** - * @brief Check if tag/edge containes full text index when alter it. + * @brief Check if tag/edge contains full text index when alter it. * * @tparam RESP * @param cols @@ -379,7 +379,7 @@ class BaseProcessor { GraphSpaceID spaceId, int32_t tagOrEdge); /** - * @brief Check if index on given fields alredy exist. + * @brief Check if index on given fields already exist. * * @tparam RESP * @param fields diff --git a/src/meta/processors/admin/AdminClient.cpp b/src/meta/processors/admin/AdminClient.cpp index b0537350627..de719f03d68 100644 --- a/src/meta/processors/admin/AdminClient.cpp +++ b/src/meta/processors/admin/AdminClient.cpp @@ -325,7 +325,7 @@ folly::Future AdminClient::checkPeers(GraphSpaceID spaceId, PartitionID } else { auto v = std::move(t).value(); for (auto& resp : v) { - // The exception has been catched inside getResponseFromPart. + // The exception has been caught inside getResponseFromPart. CHECK(!resp.hasException()); auto st = std::move(resp).value(); if (!st.ok()) { diff --git a/src/meta/processors/admin/AdminClient.h b/src/meta/processors/admin/AdminClient.h index 82052514128..6071077026b 100644 --- a/src/meta/processors/admin/AdminClient.h +++ b/src/meta/processors/admin/AdminClient.h @@ -76,7 +76,7 @@ class AdminClient { /** * @brief Add a learner for given partition. The rpc will be sent to - * the partition leader, writting the add event as a log. + * the partition leader, writing the add event as a log. * * @param spaceId * @param partId @@ -256,8 +256,8 @@ class AdminClient { RespGenerator respGen); /** - * @brief Send the rpc request to a storage node, the operation is only realted to the spaces, - * does not have affect on a partition. It may also return extra infomations, so return + * @brief Send the rpc request to a storage node, the operation is only related to the spaces, + * does not have affect on a partition. It may also return extra information, so return * StatusOr is necessary * * @tparam Request RPC request type diff --git a/src/meta/processors/admin/AgentHBProcessor.cpp b/src/meta/processors/admin/AgentHBProcessor.cpp index 861bec68d27..d1e53a7f66d 100644 --- a/src/meta/processors/admin/AgentHBProcessor.cpp +++ b/src/meta/processors/admin/AgentHBProcessor.cpp @@ -78,7 +78,7 @@ void AgentHBProcessor::process(const cpp2::AgentHBReq& req) { std::vector serviceList; for (const auto& [addr, role] : services) { if (addr == agentAddr) { - // skip iteself + // skip itself agentCnt++; continue; } diff --git a/src/meta/processors/admin/ClearSpaceProcessor.cpp b/src/meta/processors/admin/ClearSpaceProcessor.cpp index 2b5f111ea9d..910b62b5471 100644 --- a/src/meta/processors/admin/ClearSpaceProcessor.cpp +++ b/src/meta/processors/admin/ClearSpaceProcessor.cpp @@ -35,7 +35,7 @@ void ClearSpaceProcessor::process(const cpp2::ClearSpaceReq& req) { } spaceId = nebula::value(spaceRet); - // 2. Fetch all parts info accroding the spaceId. + // 2. Fetch all parts info according the spaceId. auto ret = getAllParts(spaceId); if (!nebula::ok(ret)) { handleErrorCode(nebula::error(ret)); diff --git a/src/meta/processors/admin/HBProcessor.cpp b/src/meta/processors/admin/HBProcessor.cpp index 18ea3caf6c3..cd43e1e33f6 100644 --- a/src/meta/processors/admin/HBProcessor.cpp +++ b/src/meta/processors/admin/HBProcessor.cpp @@ -38,7 +38,7 @@ void HBProcessor::process(const cpp2::HBReq& req) { if (role == cpp2::HostRole::STORAGE || role == cpp2::HostRole::STORAGE_LISTENER) { if (role == cpp2::HostRole::STORAGE) { if (!ActiveHostsMan::machineRegisted(kvstore_, host)) { - LOG(INFO) << "Machine " << host << " is not registed"; + LOG(INFO) << "Machine " << host << " is not registered"; handleErrorCode(nebula::cpp2::ErrorCode::E_MACHINE_NOT_FOUND); setLeaderInfo(); onFinished(); diff --git a/src/meta/processors/index/FTIndexProcessor.h b/src/meta/processors/index/FTIndexProcessor.h index d14de0408ac..b1398ddd65d 100644 --- a/src/meta/processors/index/FTIndexProcessor.h +++ b/src/meta/processors/index/FTIndexProcessor.h @@ -47,7 +47,7 @@ class DropFTIndexProcessor : public BaseProcessor { }; /** - * @brief Get all the fulltext index info by scaning fulltext index prefix. + * @brief Get all the fulltext index info by scanning fulltext index prefix. * */ class ListFTIndexesProcessor : public BaseProcessor { diff --git a/src/meta/processors/index/ListEdgeIndexesProcessor.h b/src/meta/processors/index/ListEdgeIndexesProcessor.h index 9c80119aabf..86ca20bd3af 100644 --- a/src/meta/processors/index/ListEdgeIndexesProcessor.h +++ b/src/meta/processors/index/ListEdgeIndexesProcessor.h @@ -12,7 +12,7 @@ namespace nebula { namespace meta { /** - * @brief Get all edge index items by scaning index prefix and then filter out the + * @brief Get all edge index items by scanning index prefix and then filter out the * indexes with edge type. * */ diff --git a/src/meta/processors/index/ListTagIndexesProcessor.h b/src/meta/processors/index/ListTagIndexesProcessor.h index 9f10e9a77a5..7857f8144e7 100644 --- a/src/meta/processors/index/ListTagIndexesProcessor.h +++ b/src/meta/processors/index/ListTagIndexesProcessor.h @@ -12,7 +12,7 @@ namespace nebula { namespace meta { /** - * @brief Get all tag index items by scaning index prefix and then filter out the + * @brief Get all tag index items by scanning index prefix and then filter out the * indexes with tag type. * */ diff --git a/src/meta/processors/job/JobManager.cpp b/src/meta/processors/job/JobManager.cpp index ee7e0a3b54a..21bd9276a0b 100644 --- a/src/meta/processors/job/JobManager.cpp +++ b/src/meta/processors/job/JobManager.cpp @@ -195,7 +195,7 @@ nebula::cpp2::ErrorCode JobManager::prepareRunJob(JobExecutor* jobExec, const JobDescription& jobDesc, JbOp op) { if (jobExec == nullptr) { - LOG(INFO) << "Unreconized job type " + LOG(INFO) << "Unrecognized job type " << apache::thrift::util::enumNameSafe(jobDesc.getJobType()); return nebula::cpp2::ErrorCode::E_ADD_JOB_FAILURE; } diff --git a/src/meta/processors/job/LeaderBalanceJobExecutor.cpp b/src/meta/processors/job/LeaderBalanceJobExecutor.cpp index 9c730bdb114..80140fca653 100644 --- a/src/meta/processors/job/LeaderBalanceJobExecutor.cpp +++ b/src/meta/processors/job/LeaderBalanceJobExecutor.cpp @@ -54,7 +54,7 @@ ErrorOr LeaderBalanceJobExecutor::getHostParts(Gr bool dependentOnZone, HostParts& hostParts, int32_t& totalParts) { - // has been locked ouside + // has been locked outside const auto& prefix = MetaKeyUtils::partPrefix(spaceId); std::unique_ptr iter; auto retCode = kvstore_->prefix(kDefaultSpaceId, kDefaultPartId, prefix, &iter); diff --git a/src/meta/processors/job/ZoneBalanceJobExecutor.cpp b/src/meta/processors/job/ZoneBalanceJobExecutor.cpp index 54cfd25a5ec..60a1f1a3047 100644 --- a/src/meta/processors/job/ZoneBalanceJobExecutor.cpp +++ b/src/meta/processors/job/ZoneBalanceJobExecutor.cpp @@ -174,7 +174,7 @@ nebula::cpp2::ErrorCode ZoneBalanceJobExecutor::rebalanceActiveZones( break; } } - // if the zone's part reach the avgPartNum,it can't recieve parts any more + // if the zone's part reach the avgPartNum,it can't receive parts any more if (newLeftIndex == leftEnd - 1 && sortedActiveZonesRef[newLeftIndex]->partNum_ >= avgPartNum) { leftEnd--; @@ -324,12 +324,12 @@ Status ZoneBalanceJobExecutor::buildBalancePlan() { return Status::Error(apache::thrift::util::enumNameSafe(rc)); } - bool emty = std::find_if(existTasks.begin(), - existTasks.end(), - [](std::pair>& p) { - return !p.second.empty(); - }) == existTasks.end(); - if (emty) { + bool empty = std::find_if(existTasks.begin(), + existTasks.end(), + [](std::pair>& p) { + return !p.second.empty(); + }) == existTasks.end(); + if (empty) { return Status::Balanced(); } plan_ = std::make_unique(jobDescription_, kvstore_, adminClient_); diff --git a/src/meta/processors/parts/CreateSpaceProcessor.cpp b/src/meta/processors/parts/CreateSpaceProcessor.cpp index 2247f9f231a..5f66671cc80 100644 --- a/src/meta/processors/parts/CreateSpaceProcessor.cpp +++ b/src/meta/processors/parts/CreateSpaceProcessor.cpp @@ -113,7 +113,7 @@ void CreateSpaceProcessor::process(const cpp2::CreateSpaceReq& req) { std::vector<::std::string> zones; nebula::cpp2::ErrorCode code = nebula::cpp2::ErrorCode::SUCCEEDED; if (properties.get_zone_names().empty()) { - // If zone names is emtpy, then this space could use all zones. + // If zone names is empty, then this space could use all zones. const auto& zonePrefix = MetaKeyUtils::zonePrefix(); auto zoneIterRet = doPrefix(zonePrefix); if (!nebula::ok(zoneIterRet)) { diff --git a/src/meta/processors/parts/ListHostsProcessor.cpp b/src/meta/processors/parts/ListHostsProcessor.cpp index 01cddbed0cb..cf32cd7c0e7 100644 --- a/src/meta/processors/parts/ListHostsProcessor.cpp +++ b/src/meta/processors/parts/ListHostsProcessor.cpp @@ -208,7 +208,7 @@ nebula::cpp2::ErrorCode ListHostsProcessor::fillLeaders() { return nebula::error(activeHostsRet); } - // TOOD(spw): duplicated with allHostsWithStatus, could be removed when refactor the next time. + // TODO(spw): duplicated with allHostsWithStatus, could be removed when refactor the next time. auto activeHosts = nebula::value(activeHostsRet); const auto& prefix = MetaKeyUtils::leaderPrefix(); auto iterRet = doPrefix(prefix); diff --git a/src/meta/processors/schema/AlterEdgeProcessor.cpp b/src/meta/processors/schema/AlterEdgeProcessor.cpp index adfa26fa7be..ef3e35d50ef 100644 --- a/src/meta/processors/schema/AlterEdgeProcessor.cpp +++ b/src/meta/processors/schema/AlterEdgeProcessor.cpp @@ -30,7 +30,7 @@ void AlterEdgeProcessor::process(const cpp2::AlterEdgeReq& req) { // Check the edge belongs to the space // Because there are many edge types with same type and different versions, we should get - // latest edge type by prefix scaning. + // latest edge type by prefix scanning. auto edgePrefix = MetaKeyUtils::schemaEdgePrefix(spaceId, edgeType); auto retPre = doPrefix(edgePrefix); if (!nebula::ok(retPre)) { diff --git a/src/meta/processors/service/ServiceProcessor.h b/src/meta/processors/service/ServiceProcessor.h index f8757b7f805..30b5262718c 100644 --- a/src/meta/processors/service/ServiceProcessor.h +++ b/src/meta/processors/service/ServiceProcessor.h @@ -13,7 +13,7 @@ namespace meta { /** * @brief Sign in external service info. It is only used in listeners now, such as ES - * service servce info. + * service info. * */ class SignInServiceProcessor : public BaseProcessor { diff --git a/src/meta/processors/session/SessionManagerProcessor.h b/src/meta/processors/session/SessionManagerProcessor.h index fd3d70332bd..ad2dd24e510 100644 --- a/src/meta/processors/session/SessionManagerProcessor.h +++ b/src/meta/processors/session/SessionManagerProcessor.h @@ -32,7 +32,7 @@ class CreateSessionProcessor : public BaseProcessor { /** * @brief Update sessions and get killed queries. Then the graph can kill - * its queries by the reponse. + * its queries by the response. * */ class UpdateSessionsProcessor : public BaseProcessor { diff --git a/src/meta/test/CreateBackupProcessorTest.cpp b/src/meta/test/CreateBackupProcessorTest.cpp index 00c7c1ea931..a090647fa26 100644 --- a/src/meta/test/CreateBackupProcessorTest.cpp +++ b/src/meta/test/CreateBackupProcessorTest.cpp @@ -101,7 +101,7 @@ TEST(ProcessorTest, CreateBackupTest) { kv->asyncMultiPut(kDefaultSpaceId, kDefaultPartId, std::move(machines), [&](auto) { b.post(); }); b.wait(); - // resgister active hosts, same with heartbeat + // register active hosts, same with heartbeat auto now = time::WallClock::fastNowInMilliSec(); HostAddr host(localIp, rpcServer->port_); std::vector time; diff --git a/src/meta/test/IndexProcessorTest.cpp b/src/meta/test/IndexProcessorTest.cpp index c5072c20a21..5523e439085 100644 --- a/src/meta/test/IndexProcessorTest.cpp +++ b/src/meta/test/IndexProcessorTest.cpp @@ -1321,7 +1321,7 @@ TEST(IndexProcessorTest, IndexTTLTagTest) { auto resp = std::move(f).get(); ASSERT_EQ(nebula::cpp2::ErrorCode::SUCCEEDED, resp.get_code()); } - // Tag with ttl to creat index on ttl col + // Tag with ttl to create index on ttl col { cpp2::CreateTagIndexReq req; req.space_id_ref() = 1; diff --git a/src/meta/test/ProcessorTest.cpp b/src/meta/test/ProcessorTest.cpp index e69e585f199..ddf41189f49 100644 --- a/src/meta/test/ProcessorTest.cpp +++ b/src/meta/test/ProcessorTest.cpp @@ -4708,7 +4708,7 @@ TEST(ProcessorTest, DropZoneTest) { ASSERT_EQ(nebula::cpp2::ErrorCode::SUCCEEDED, resp.get_code()); } { - // Drop zone which is droped + // Drop zone which is dropped cpp2::DropZoneReq req; req.zone_name_ref() = "zone_0"; auto* processor = DropZoneProcessor::instance(kv.get()); diff --git a/src/meta/test/RestoreProcessorTest.cpp b/src/meta/test/RestoreProcessorTest.cpp index 3f76c5f4b45..f7b38eb3f8d 100644 --- a/src/meta/test/RestoreProcessorTest.cpp +++ b/src/meta/test/RestoreProcessorTest.cpp @@ -111,7 +111,7 @@ TEST(RestoreProcessorTest, RestoreTest) { ASSERT_EQ(it, files.cend()); // should not include system tables req.files_ref() = std::move(files); - // mock an new cluster {host4, host5. host6}, and constuct restore pairs + // mock an new cluster {host4, host5. host6}, and construct restore pairs std::vector hostPairs; HostAddr host4("127.0.0.4", 3360); HostAddr host5("127.0.0.5", 3360); diff --git a/src/meta/upgrade/v2/MetaServiceUtilsV2.h b/src/meta/upgrade/v2/MetaServiceUtilsV2.h index 7c5cbcec9a2..261a4af0037 100644 --- a/src/meta/upgrade/v2/MetaServiceUtilsV2.h +++ b/src/meta/upgrade/v2/MetaServiceUtilsV2.h @@ -19,7 +19,7 @@ const std::string kGroupsTable = "__groups__"; // NOLINT /** * @brief Meta kv store utils to help parsing key and values. - * These shoule be used to upgrade meta from 2.x to 3.x + * These should be used to upgrade meta from 2.x to 3.x * */ class MetaServiceUtilsV2 final { diff --git a/src/storage/StorageServer.cpp b/src/storage/StorageServer.cpp index 4fef2b0d3b8..21bbd7e8423 100644 --- a/src/storage/StorageServer.cpp +++ b/src/storage/StorageServer.cpp @@ -174,7 +174,7 @@ bool StorageServer::start() { #ifdef BUILD_STANDALONE if (FLAGS_add_local_host) { - // meta allready ready when standalone. + // meta already ready when standalone. auto ret = metaClient_->checkLocalMachineRegistered(); if (ret.ok()) { if (!ret.value()) { diff --git a/src/storage/admin/AdminProcessor.h b/src/storage/admin/AdminProcessor.h index 680c93a0a32..bc25f43ad0b 100644 --- a/src/storage/admin/AdminProcessor.h +++ b/src/storage/admin/AdminProcessor.h @@ -37,7 +37,7 @@ class TransLeaderProcessor : public BaseProcessor { /** * @brief Entry point for trans leader. * - * @param req Reuqest for trans leader. + * @param req Request for trans leader. */ void process(const cpp2::TransLeaderReq& req) { CHECK_NOTNULL(env_->kvstore_); @@ -193,7 +193,7 @@ class RemovePartProcessor : public BaseProcessor { /** * @brief Entry point for removing part. * - * @param req Reuqest for removing part. + * @param req Request for removing part. */ void process(const cpp2::RemovePartReq& req) { auto spaceId = req.get_space_id(); @@ -285,7 +285,7 @@ class AddLearnerProcessor : public BaseProcessor { /** * @brief Entry point for adding learner. * - * @param req Reuqest for adding learner. + * @param req Request for adding learner. */ void process(const cpp2::AddLearnerReq& req) { auto spaceId = req.get_space_id(); @@ -332,7 +332,7 @@ class WaitingForCatchUpDataProcessor : public BaseProcessor /** * @brief Entry point to wait data catching up data for space. * - * @param req Reuqest for waiting data catching up. + * @param req Request for waiting data catching up. */ void process(const cpp2::CatchUpDataReq& req) { auto spaceId = req.get_space_id(); @@ -351,7 +351,7 @@ class WaitingForCatchUpDataProcessor : public BaseProcessor folly::async([this, part, peer, spaceId, partId] { int retry = FLAGS_waiting_catch_up_retry_times; while (retry-- > 0) { - auto res = part->isCatchedUp(peer); + auto res = part->isCaughtUp(peer); LOG(INFO) << "Waiting for catching up data, peer " << peer << ", space " << spaceId << ", part " << partId << ", remaining " << retry << " retry times" << ", result " << static_cast(res); diff --git a/src/storage/admin/AdminTaskManager.cpp b/src/storage/admin/AdminTaskManager.cpp index ca764ce6f71..ba285c96a41 100644 --- a/src/storage/admin/AdminTaskManager.cpp +++ b/src/storage/admin/AdminTaskManager.cpp @@ -123,7 +123,7 @@ void AdminTaskManager::handleUnreportedTasks() { tId, fut.value().status().toString()); if (fut.value().status() == Status::Error("Space not existed!")) { - // space has been droped, remove the task status. + // space has been dropped, remove the task status. keys.emplace_back(key.data(), key.size()); } else { ifAnyUnreported_ = true; diff --git a/src/storage/admin/CreateCheckpointProcessor.h b/src/storage/admin/CreateCheckpointProcessor.h index 7f4edd36122..e8f90510664 100644 --- a/src/storage/admin/CreateCheckpointProcessor.h +++ b/src/storage/admin/CreateCheckpointProcessor.h @@ -29,7 +29,7 @@ class CreateCheckpointProcessor { /** * @brief Entry point for creating checkpoint. * - * @param req Reuqest for creating checkpoint. + * @param req Request for creating checkpoint. */ void process(const cpp2::CreateCPRequest& req); diff --git a/src/storage/admin/DropCheckpointProcessor.h b/src/storage/admin/DropCheckpointProcessor.h index 72cf4cb45a6..6819eab8d60 100644 --- a/src/storage/admin/DropCheckpointProcessor.h +++ b/src/storage/admin/DropCheckpointProcessor.h @@ -28,7 +28,7 @@ class DropCheckpointProcessor { /** * @brief Entry point for dropping checkpoint. * - * @param req Reuqest for dropping checkpoint. + * @param req Request for dropping checkpoint. */ void process(const cpp2::DropCPRequest& req); diff --git a/src/storage/admin/RebuildIndexTask.cpp b/src/storage/admin/RebuildIndexTask.cpp index e4cbad43fdf..bc6e22c98ca 100644 --- a/src/storage/admin/RebuildIndexTask.cpp +++ b/src/storage/admin/RebuildIndexTask.cpp @@ -164,7 +164,7 @@ nebula::cpp2::ErrorCode RebuildIndexTask::buildIndexOnOperations( VLOG(1) << "Processing Delete Operation " << opVal; batchHolder->remove(opVal.str()); } else { - LOG(INFO) << "Unknow Operation Type"; + LOG(INFO) << "Unknown Operation Type"; return nebula::cpp2::ErrorCode::E_INVALID_OPERATION; } diff --git a/src/storage/admin/SendBlockSignProcessor.h b/src/storage/admin/SendBlockSignProcessor.h index e4eebfbd228..59ed2db8767 100644 --- a/src/storage/admin/SendBlockSignProcessor.h +++ b/src/storage/admin/SendBlockSignProcessor.h @@ -29,7 +29,7 @@ class SendBlockSignProcessor { /** * @brief Entry point for sending block sign. * - * @param req Reuqest for sending block sign. + * @param req Request for sending block sign. */ void process(const cpp2::BlockingSignRequest& req); diff --git a/src/storage/admin/StopAdminTaskProcessor.h b/src/storage/admin/StopAdminTaskProcessor.h index b3418e50041..06ad872a0ae 100644 --- a/src/storage/admin/StopAdminTaskProcessor.h +++ b/src/storage/admin/StopAdminTaskProcessor.h @@ -29,7 +29,7 @@ class StopAdminTaskProcessor { /** * @brief Entry point of stopping admin task. * - * @param req Reuqest for stopping admin task. + * @param req Request for stopping admin task. */ void process(const cpp2::StopTaskRequest& req); diff --git a/src/storage/context/StorageExpressionContext.h b/src/storage/context/StorageExpressionContext.h index f11b3858d11..cb6ccb2e3d4 100644 --- a/src/storage/context/StorageExpressionContext.h +++ b/src/storage/context/StorageExpressionContext.h @@ -254,7 +254,7 @@ class StorageExpressionContext final : public ExpressionContext { * @brief Set the Tag Prop object * * @param tagName Tag name. - * @param prop Porperty name. + * @param prop Property name. * @param value Value to set. */ void setTagProp(const std::string& tagName, const std::string& prop, nebula::Value value) { diff --git a/src/storage/exec/IndexNode.h b/src/storage/exec/IndexNode.h index 82d9e75ebed..19253cd22be 100644 --- a/src/storage/exec/IndexNode.h +++ b/src/storage/exec/IndexNode.h @@ -65,7 +65,7 @@ struct InitContext { * The functions of IndexNode is divided into three parts. * * First part is used to build node. This part contains two stages. First, the user needs to make - * various derived classes and nd organize them into a plan tree(by `children_`).After that, the + * various derived classes and organize them into a plan tree(by `children_`).After that, the * root node of plan tree needs to call the init function and recursively call the init function of * all child nodes, `Initcontext` will pass parameters between nodes to determine the data format or * other information to be returned between nodes during execution.Note that `init` needs to be @@ -87,7 +87,7 @@ class IndexNode { * @brief Iterate result of IndexNode::next() * * There are three options for Result: - * - not succeeded. Some error occured during iterating. + * - not succeeded. Some error occurred during iterating. * - succeeded but there isn't any remain Row. * - succeeded and there is a Row. */ @@ -287,7 +287,7 @@ class IndexNode { bool profileDetail_{false}; }; -/* Defination of inline function */ +/* Definition of inline function */ inline IndexNode::Result IndexNode::next() { beforeNext(); if (context_->isPlanKilled()) { diff --git a/src/storage/exec/IndexScanNode.cpp b/src/storage/exec/IndexScanNode.cpp index 69260d4bb93..93e8251aa19 100644 --- a/src/storage/exec/IndexScanNode.cpp +++ b/src/storage/exec/IndexScanNode.cpp @@ -498,12 +498,12 @@ void IndexScanNode::decodePropFromIndex(folly::StringPiece key, if (colPosMap.empty()) { return; } - // offset is the start posistion of index values + // offset is the start position of index values size_t offset = sizeof(PartitionID) + sizeof(IndexID); std::bitset<16> nullableBit; int8_t nullableColPosit = 15; if (indexNullable_) { - // key has been truncated ouside, it **ONLY** contains partId, indexId, indexValue and + // key has been truncated outside, it **ONLY** contains partId, indexId, indexValue and // nullableBits. So the last two bytes is the nullableBits auto bitOffset = key.size() - sizeof(uint16_t); auto v = *reinterpret_cast(key.data() + bitOffset); diff --git a/src/storage/exec/IndexScanNode.h b/src/storage/exec/IndexScanNode.h index 9bea817953e..c271d6b8364 100644 --- a/src/storage/exec/IndexScanNode.h +++ b/src/storage/exec/IndexScanNode.h @@ -88,7 +88,7 @@ class IndexScanNode : public IndexNode { * @brief decode all props from index key * * decodePropFromIndex() will decode props who are defined in tag/edge properties.And, - * IndexScanNode sometime needs not only those but alse vid,edge_type,tag_id. decodeFromIndex() + * IndexScanNode sometime needs not only those but also vid,edge_type,tag_id. decodeFromIndex() * should be override by derived class and decode these special prop and then call * decodePropFromIndex() to decode general props. * diff --git a/src/storage/exec/ScanNode.h b/src/storage/exec/ScanNode.h index 6c58080c0f2..4055505b47e 100644 --- a/src/storage/exec/ScanNode.h +++ b/src/storage/exec/ScanNode.h @@ -283,7 +283,7 @@ class ScanEdgePropNode : public QueryNode { nebula::cpp2::ErrorCode collectOneRow(bool isIntId, std::size_t vIdLen) { List row; nebula::cpp2::ErrorCode ret = nebula::cpp2::ErrorCode::SUCCEEDED; - // Usually there is only one edge node, when all of the egdeNodes are invalid (e.g. ttl + // Usually there is only one edge node, when all of the edgeNodes are invalid (e.g. ttl // expired), just skip the row. If we don't skip it, there will be a whole line of empty value. if (!std::any_of(edgeNodes_.begin(), edgeNodes_.end(), [](const auto& edgeNode) { return edgeNode->valid(); diff --git a/src/storage/index/LookupProcessor.cpp b/src/storage/index/LookupProcessor.cpp index 79b6066ec2b..b4904708f65 100644 --- a/src/storage/index/LookupProcessor.cpp +++ b/src/storage/index/LookupProcessor.cpp @@ -311,7 +311,7 @@ void LookupProcessor::runInMultipleThread(const std::vector& parts, statResults.emplace_back(std::move(statResult)); } DLOG(INFO) << "finish"; - // IndexAggregateNode has been copyed and each part get it's own aggregate info, + // IndexAggregateNode has been copied and each part get it's own aggregate info, // we need to merge it this->mergeStatsResult(statResults); this->onProcessFinished(); diff --git a/src/storage/index/LookupProcessor.h b/src/storage/index/LookupProcessor.h index f5ea19db6aa..c0443404a7c 100644 --- a/src/storage/index/LookupProcessor.h +++ b/src/storage/index/LookupProcessor.h @@ -15,7 +15,7 @@ extern ProcessorCounters kLookupCounters; /** * @brief processor support index based search (lookup match) - * not compatiable with other processor. + * not compatible with other processor. */ class LookupProcessor : public BaseProcessor { public: diff --git a/src/storage/query/GetNeighborsProcessor.h b/src/storage/query/GetNeighborsProcessor.h index 85b8f5a6eca..de428646ec7 100644 --- a/src/storage/query/GetNeighborsProcessor.h +++ b/src/storage/query/GetNeighborsProcessor.h @@ -27,12 +27,12 @@ class GetNeighborsProcessor public: /** - * @brief Consturct instance of GetNeighborsProcessor + * @brief Construct instance of GetNeighborsProcessor * * @param env Related environment variables for storage. * @param counters Statistic counter pointer for getting neighbors. * @param executor Expected executor for this processor, running directly if nullptr. - * @return GetNeighborsProcessor* Consturcted instance. + * @return GetNeighborsProcessor* Constructed instance. */ static GetNeighborsProcessor* instance(StorageEnv* env, const ProcessorCounters* counters = &kGetNeighborsCounters, diff --git a/src/storage/query/GetPropProcessor.h b/src/storage/query/GetPropProcessor.h index d329dda004f..409ab9cb033 100644 --- a/src/storage/query/GetPropProcessor.h +++ b/src/storage/query/GetPropProcessor.h @@ -22,12 +22,12 @@ extern ProcessorCounters kGetPropCounters; class GetPropProcessor : public QueryBaseProcessor { public: /** - * @brief Consturct instance of GetPropProcessor + * @brief Construct instance of GetPropProcessor * * @param env Related environment variables for storage. * @param counters Statistic counter pointer for getting properties. * @param executor Expected executor for this processor, running directly if nullptr. - * @return GetPropProcessor* Consturcted instance. + * @return GetPropProcessor* Constructed instance. */ static GetPropProcessor* instance(StorageEnv* env, const ProcessorCounters* counters = &kGetPropCounters, @@ -38,14 +38,14 @@ class GetPropProcessor : public QueryBaseProcessor hosts = {storageAddr}; auto result = metaClient->addHosts(std::move(hosts)).get(); EXPECT_TRUE(result.ok()); diff --git a/src/storage/test/QueryTestUtils.h b/src/storage/test/QueryTestUtils.h index ef6abb5b2ce..2d0136f24c1 100644 --- a/src/storage/test/QueryTestUtils.h +++ b/src/storage/test/QueryTestUtils.h @@ -379,7 +379,7 @@ class QueryTestUtils { } else { ASSERT_EQ(Value::Type::__EMPTY__, row.values[1].type()); } - // the last column is yeild expression + // the last column is yield expression ASSERT_EQ(Value::Type::__EMPTY__, row.values[expectColumnCount - 1].type()); checkRowProps(row, dataSet.colNames, tags, edges); } diff --git a/src/storage/test/UpdateVertexTest.cpp b/src/storage/test/UpdateVertexTest.cpp index d7e389fe7c0..89006d40b00 100644 --- a/src/storage/test/UpdateVertexTest.cpp +++ b/src/storage/test/UpdateVertexTest.cpp @@ -1072,7 +1072,7 @@ TEST(UpdateVertexTest, TTL_Insert_Test) { EXPECT_EQ("Tim Duncan", (*resp.props_ref()).rows[0].values[4].getStr()); EXPECT_EQ(1, (*resp.props_ref()).rows[0].values[5].getInt()); - // Get player from kvstore directly, ttl expired data can be readded + // Get player from kvstore directly, ttl expired data can be read // First record is inserted record data // Second record is expired ttl data auto prefix = NebulaKeyUtils::tagPrefix(spaceVidLen, partId, vertexId, tagId); diff --git a/src/storage/transaction/ChainAddEdgesLocalProcessor.h b/src/storage/transaction/ChainAddEdgesLocalProcessor.h index 30018d70e41..7efbb95389c 100644 --- a/src/storage/transaction/ChainAddEdgesLocalProcessor.h +++ b/src/storage/transaction/ChainAddEdgesLocalProcessor.h @@ -128,7 +128,7 @@ class ChainAddEdgesLocalProcessor : public BaseProcessor, /** * @brief check is an error code belongs to kv store * we can do retry / recover if we meet a kv store error - * but if we meet a logical error (retry will alwasy failed) + * but if we meet a logical error (retry will always failed) * we should return error directly. * @param code * @return true diff --git a/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h b/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h index 06555a64686..a0153f7fa87 100644 --- a/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h +++ b/src/storage/transaction/ChainDeleteEdgesLocalProcessor.h @@ -53,7 +53,7 @@ class ChainDeleteEdgesLocalProcessor : public BaseProcessor, void hookFunc(HookFuncPara& para); /** - * @brief if remote side explicit reported faild, called this + * @brief if remote side explicit reported failed, called this */ folly::SemiFuture abort(); diff --git a/src/tools/db-upgrade/DbUpgrader.cpp b/src/tools/db-upgrade/DbUpgrader.cpp index 822f9cc7899..9c21706e7e3 100644 --- a/src/tools/db-upgrade/DbUpgrader.cpp +++ b/src/tools/db-upgrade/DbUpgrader.cpp @@ -923,19 +923,19 @@ void UpgraderSpace::runPartV3() { std::time(nullptr)); ::rocksdb::Status s = sst_file_writer.Open(file); if (!s.ok()) { - LOG(FATAL) << "Faild upgrade V3 of space " << spaceId_ << ", part " << partId << ":" + LOG(FATAL) << "Failed to upgrade V3 of space " << spaceId_ << ", part " << partId << ":" << s.code(); } for (auto item : data) { s = sst_file_writer.Put(item.first, item.second); if (!s.ok()) { - LOG(FATAL) << "Faild upgrade V3 of space " << spaceId_ << ", part " << partId << ":" + LOG(FATAL) << "Failed to upgrade V3 of space " << spaceId_ << ", part " << partId << ":" << s.code(); } } s = sst_file_writer.Finish(); if (!s.ok()) { - LOG(FATAL) << "Faild upgrade V3 of space " << spaceId_ << ", part " << partId << ":" + LOG(FATAL) << "Failed to upgrade V3 of space " << spaceId_ << ", part " << partId << ":" << s.code(); } std::lock_guard lck(this->ingest_sst_file_mut_); @@ -995,7 +995,7 @@ void UpgraderSpace::doProcessV3() { if (ingest_sst_file_.size() != 0) { auto code = readEngine_->ingest(ingest_sst_file_, true); if (code != ::nebula::cpp2::ErrorCode::SUCCEEDED) { - LOG(FATAL) << "Faild upgrade 2:3 when ingest sst file:" << static_cast(code); + LOG(FATAL) << "Failed to upgrade 2:3 when ingest sst file:" << static_cast(code); } } readEngine_->put(NebulaKeyUtils::dataVersionKey(), NebulaKeyUtilsV3::dataVersionValue()); diff --git a/src/tools/meta-dump/MetaDumpTool.cpp b/src/tools/meta-dump/MetaDumpTool.cpp index 5c93188ba3d..23a9f8e814e 100644 --- a/src/tools/meta-dump/MetaDumpTool.cpp +++ b/src/tools/meta-dump/MetaDumpTool.cpp @@ -67,7 +67,7 @@ class MetaDumper { } if (!found) { - LOG(INFO) << "Meta version= Unkown"; + LOG(INFO) << "Meta version= Unknown"; } } } diff --git a/tests/tck/features/bugfix/MTSafeConcurrencyVariables.feature b/tests/tck/features/bugfix/MTSafeConcurrencyVariables.feature index ddb5b9d7615..9736117a0a9 100644 --- a/tests/tck/features/bugfix/MTSafeConcurrencyVariables.feature +++ b/tests/tck/features/bugfix/MTSafeConcurrencyVariables.feature @@ -1,7 +1,7 @@ # Copyright (c) 2022 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. -Feature: Test MT-safe varaibles +Feature: Test MT-safe variables Scenario: Binary plan of minus # It's not stable to reproduce the bug, so we run it 100 times diff --git a/tests/tck/features/delete/DeleteVertex.IntVid.feature b/tests/tck/features/delete/DeleteVertex.IntVid.feature index 60326b7344a..09a55727893 100644 --- a/tests/tck/features/delete/DeleteVertex.IntVid.feature +++ b/tests/tck/features/delete/DeleteVertex.IntVid.feature @@ -76,7 +76,7 @@ Feature: Delete int vid of vertex """ Then the result should be, in any order: | like._dst | - # before delete multi vertexes to check value by go + # before delete multi vertices to check value by go When executing query: """ GO FROM hash("Chris Paul") OVER like YIELD like._dst @@ -86,13 +86,13 @@ Feature: Delete int vid of vertex | "LeBron James" | | "Dwyane Wade" | | "Carmelo Anthony" | - # delete multi vertexes + # delete multi vertices When executing query: """ DELETE VERTEX hash("LeBron James"), hash("Dwyane Wade"), hash("Carmelo Anthony") WITH EDGE; """ Then the execution should be successful - # after delete multi vertexes to check value by go + # after delete multi vertices to check value by go When executing query: """ FETCH PROP ON player hash("Tony Parker") YIELD player.name, player.age diff --git a/tests/tck/features/delete/DeleteVertex.feature b/tests/tck/features/delete/DeleteVertex.feature index 7da665c0403..58703d63a86 100644 --- a/tests/tck/features/delete/DeleteVertex.feature +++ b/tests/tck/features/delete/DeleteVertex.feature @@ -76,7 +76,7 @@ Feature: Delete string vid of vertex """ Then the result should be, in any order: | like._dst | - # before delete multi vertexes to check value by go + # before delete multi vertices to check value by go When executing query: """ GO FROM "Chris Paul" OVER like YIELD like._dst @@ -86,13 +86,13 @@ Feature: Delete string vid of vertex | "LeBron James" | | "Dwyane Wade" | | "Carmelo Anthony" | - # delete multi vertexes + # delete multi vertices When executing query: """ DELETE VERTEX "LeBron James", "Dwyane Wade", "Carmelo Anthony" WITH EDGE; """ Then the execution should be successful - # after delete multi vertexes to check value by go + # after delete multi vertices to check value by go When executing query: """ FETCH PROP ON player "Tony Parker" YIELD player.name, player.age diff --git a/tests/tck/features/go/GO.IntVid.feature b/tests/tck/features/go/GO.IntVid.feature index 757b31efc45..213f4434f70 100644 --- a/tests/tck/features/go/GO.IntVid.feature +++ b/tests/tck/features/go/GO.IntVid.feature @@ -512,7 +512,7 @@ Feature: IntegerVid Go Sentence | "Chris Paul" | "Dwyane Wade" | "Carmelo Anthony" | @skip - Scenario: Integer Vid all prop(reson = $-.* over * $var.* not implement) + Scenario: Integer Vid all prop(reason = $-.* over * $var.* not implement) When executing query: """ GO FROM hash('Tim Duncan'), hash('Chris Paul') OVER like YIELD $^.player.name AS name, like._dst AS id diff --git a/tests/tck/features/go/GO.feature b/tests/tck/features/go/GO.feature index 7b719d3f51d..911d9f4b4cc 100644 --- a/tests/tck/features/go/GO.feature +++ b/tests/tck/features/go/GO.feature @@ -578,7 +578,7 @@ Feature: Go Sentence | "Chris Paul" | "Dwyane Wade" | "Carmelo Anthony" | @skip - Scenario: all prop(reson = $-.* over * $var.* not implement) + Scenario: all prop(reason = $-.* over * $var.* not implement) When executing query: """ GO FROM 'Tim Duncan', 'Chris Paul' OVER like YIELD $^.player.name AS name, like._dst AS id diff --git a/tests/tck/features/go/GoYieldVertexEdge.feature b/tests/tck/features/go/GoYieldVertexEdge.feature index 5fbba5aec71..a1b2c68fe1b 100644 --- a/tests/tck/features/go/GoYieldVertexEdge.feature +++ b/tests/tck/features/go/GoYieldVertexEdge.feature @@ -561,7 +561,7 @@ Feature: Go Yield Vertex And Edge Sentence | ("Yao Ming" :player{age: 38, name: "Yao Ming"}) | "Spurs" | @skip - Scenario: all prop(reson = $-.* over * $var.* not implement) + Scenario: all prop(reason = $-.* over * $var.* not implement) When executing query: """ GO FROM 'Tim Duncan', 'Chris Paul' OVER like YIELD $^.player.name AS name, like._dst AS id diff --git a/tests/tck/features/match/MultiLineMultiQueryParts.feature b/tests/tck/features/match/MultiLineMultiQueryParts.feature index ec2916b4635..7f1c72a40ca 100644 --- a/tests/tck/features/match/MultiLineMultiQueryParts.feature +++ b/tests/tck/features/match/MultiLineMultiQueryParts.feature @@ -397,7 +397,7 @@ Feature: Multi Line Multi Query Parts | count | | 12 | - Scenario: Multi Line Some Erros + Scenario: Multi Line Some Errors When executing query: """ MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan" diff --git a/tests/tck/features/match/MultiQueryParts.feature b/tests/tck/features/match/MultiQueryParts.feature index 4cb98264889..3581366d291 100644 --- a/tests/tck/features/match/MultiQueryParts.feature +++ b/tests/tck/features/match/MultiQueryParts.feature @@ -286,7 +286,7 @@ Feature: Multi Query Parts """ Then a ExecutionError should be raised at runtime: Scan vertices or edges need to specify a limit number, or limit number can not push down. - Scenario: Some Erros + Scenario: Some Errors When executing query: """ MATCH (m)-[]-(n) WHERE id(m)=="Tim Duncan" diff --git a/tests/tck/features/set/Set.IntVid.feature b/tests/tck/features/set/Set.IntVid.feature index a0da9035ba5..b7c54a7679a 100644 --- a/tests/tck/features/set/Set.IntVid.feature +++ b/tests/tck/features/set/Set.IntVid.feature @@ -271,7 +271,7 @@ Feature: Integer Vid Set Test Then the result should be, in any order: | $var.serve.start_year | $var.$$.team.name | - Scenario: Integer Vid Diffrent column + Scenario: Integer Vid Different column When executing query: """ GO FROM hash("Tim Duncan") OVER serve YIELD $^.player.name as name, $$.team.name as player diff --git a/tests/tck/features/set/Set.feature b/tests/tck/features/set/Set.feature index a7fa0b6d162..ae952150c44 100644 --- a/tests/tck/features/set/Set.feature +++ b/tests/tck/features/set/Set.feature @@ -275,7 +275,7 @@ Feature: Set Test Then the result should be, in any order: | $var.serve.start_year | $var.$$.team.name | - Scenario: Diffrent column + Scenario: Different column Given a graph with space named "nba" When executing query: """ diff --git a/tests/tck/features/subgraph/subgraphWithFilter.feature b/tests/tck/features/subgraph/subgraphWithFilter.feature index 97afffab724..83b0ef4cdbc 100644 --- a/tests/tck/features/subgraph/subgraphWithFilter.feature +++ b/tests/tck/features/subgraph/subgraphWithFilter.feature @@ -1,7 +1,7 @@ # Copyright (c) 2022 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. -Feature: subgraph with fitler +Feature: subgraph with filter Background: Given a graph with space named "nba"