Skip to content

Commit

Permalink
fix typos (#5107)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie <[email protected]>
  • Loading branch information
veezhang and Sophie-Xie authored Dec 26, 2022
1 parent a8fee05 commit fcb29f3
Show file tree
Hide file tree
Showing 143 changed files with 257 additions and 257 deletions.
26 changes: 13 additions & 13 deletions src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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(
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -2540,7 +2540,7 @@ folly::Future<StatusOr<bool>> 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;
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/SignalHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/SignalHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/common/base/test/LoggingBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
for (int64_t i = 0; i < iters; i++) { \
LOG(INFO) << "Hello" \
<< " " \
<< "Wolrd" \
<< "World" \
<< "123"; \
}

#define XLOG_SOMETHING(iters) \
for (int64_t i = 0; i < iters; i++) { \
XLOG(INFO) << "Hello" \
<< " " \
<< "Wolrd" \
<< "World" \
<< "123"; \
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/datatypes/test/ValueToJsonTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/common/id/test/SegmentIdTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/common/time/TimeUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ StatusOr<Value> 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;
Expand Down
2 changes: 1 addition & 1 deletion src/daemons/SetupLogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/daemons/StandAloneDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ int main(int argc, char *argv[]) {

auto handler =
std::make_shared<nebula::meta::MetaServiceHandler>(gMetaKVStore.get(), metaClusterId());
LOG(INFO) << "The meta deamon start on " << metaLocalhost;
LOG(INFO) << "The meta daemon start on " << metaLocalhost;
try {
gMetaServer = std::make_unique<apache::thrift::ThriftServer>();
gMetaServer->setPort(FLAGS_meta_port);
Expand Down
2 changes: 1 addition & 1 deletion src/graph/context/ast/CypherAstContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct Path final {
std::vector<EdgeInfo> 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<std::string> compareVariables;
Expand Down
2 changes: 1 addition & 1 deletion src/graph/executor/admin/ConfigExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ folly::Future<Status> 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
Expand Down
2 changes: 1 addition & 1 deletion src/graph/executor/query/DataCollectExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
//
Expand Down
4 changes: 2 additions & 2 deletions src/graph/executor/query/InnerJoinExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/graph/executor/query/LeftJoinExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/graph/executor/query/TraverseExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/CollapseProjectRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
// +------------+------------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/CombineFilterRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. reduces the expression iterated times
//
// Tranformation:
// Transformation:
// Before:
//
// +-----+-----+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/EliminateRowCollectRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Delete unnecessary node
//
// Tranformation:
// Transformation:
// Before:
//
// +------+------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace opt {
// Query example:
// 1. match ()-[e]->() return e limit 1
//
// Tranformation:
// Transformation:
// Before:
// +---------+---------+
// | Project |
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/GetEdgesTransformRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace opt {
// Quey example:
// 1. match ()-[e]->() return e limit 3
//
// Tranformation:
// Transformation:
// Before:
// +---------+---------+
// | Project |
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/MergeGetNbrsAndDedupRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Delete unnecessary node
//
// Tranformation:
// Transformation:
// Before:
//
// +------+-------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/MergeGetVerticesAndDedupRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Delete unnecessary node
//
// Tranformation:
// Transformation:
// Before:
//
// +------+-------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/MergeGetVerticesAndProjectRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace opt {
// expression of GetVertices Benefits:
// 1. Delete unnecessary node
//
// Tranformation:
// Transformation:
// Before:
//
// +------+-------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownAggregateRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +------+------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownGetNbrsRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +------------------+------------------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownInnerJoinRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +-----------+-----------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownLeftJoinRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +-----------+-----------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownProjectRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +-------------+-------------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushFilterDownScanVerticesRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace opt {
// Benefits:
// 1. Filter data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +-------------+-------------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushLimitDownGetNeighborsRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Limit data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +--------+--------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushLimitDownIndexScanRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace opt {
// Benefits:
// 1. Limit data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +--------+--------+
Expand Down
2 changes: 1 addition & 1 deletion src/graph/optimizer/rule/PushLimitDownProjectRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace opt {
// Benefits:
// 1. Limit data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +--------+--------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace opt {
// Benefits:
// 1. Limit data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +--------+--------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace opt {
// Benefits:
// 1. Limit data early to optimize performance
//
// Tranformation:
// Transformation:
// Before:
//
// +--------+--------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
// +----------+----------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
//
// +----------+----------+
Expand Down
Loading

0 comments on commit fcb29f3

Please sign in to comment.