Skip to content

Commit

Permalink
Merge branch 'master' into job
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophie-Xie authored Jan 5, 2023
2 parents 3586efd + 404880f commit 0688dfa
Show file tree
Hide file tree
Showing 68 changed files with 198 additions and 258 deletions.
2 changes: 1 addition & 1 deletion src/clients/meta/MetaClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,7 @@ folly::Future<StatusOr<bool>> MetaClient::heartbeat() {
if (FileBasedClusterIdMan::persistInFile(resp.get_cluster_id(), FLAGS_cluster_id_path)) {
options_.clusterId_.store(resp.get_cluster_id());
} else {
LOG(DFATAL) << "Can't persist the clusterId in file " << FLAGS_cluster_id_path;
DLOG(FATAL) << "Can't persist the clusterId in file " << FLAGS_cluster_id_path;
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/clients/meta/MetaClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ class MetaClient : public BaseMetaClient {
std::atomic<int64_t> metadLastUpdateTime_{0};

int64_t metaServerVersion_{-1};
static constexpr int64_t EXPECT_META_VERSION = 3;
static constexpr int64_t EXPECT_META_VERSION = 4;

// leadersLock_ is used to protect leadersInfo
folly::SharedMutex leadersLock_;
Expand Down
3 changes: 1 addition & 2 deletions src/codec/RowReaderV1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ int64_t RowReaderV1::skipToNext(int64_t index, int64_t offset) const noexcept {
break;
}
default: {
// TODO
LOG(DFATAL) << "Unimplemented";
LOG(FATAL) << "Unimplemented";
return -1;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/codec/RowReaderV2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ Value RowReaderV2::getValueByIndex(const int64_t index) const noexcept {
case PropertyType::UNKNOWN:
break;
}
LOG(DFATAL) << "Should not reach here, illegal property type: "
<< static_cast<int>(field->type());
LOG(FATAL) << "Should not reach here, illegal property type: " << static_cast<int>(field->type());
return Value::kNullBadType;
}

Expand Down
2 changes: 1 addition & 1 deletion src/codec/RowReaderWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RowReaderWrapper::RowReaderWrapper(const meta::SchemaProviderIf* schema,
readerV2_.resetImpl(schema, row);
currReader_ = &readerV2_;
} else {
LOG(DFATAL) << "Should not reach here";
LOG(FATAL) << "Should not reach here";
readerV2_.resetImpl(schema, row);
currReader_ = &readerV2_;
}
Expand Down
10 changes: 5 additions & 5 deletions src/codec/RowWriterV2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RowWriterV2::RowWriterV2(const meta::SchemaProviderIf* schema)
header = 0x0F; // 0x08 | 0x07, seven bytes for the schema version
headerLen_ = 8;
} else {
LOG(DFATAL) << "Schema version too big";
LOG(FATAL) << "Schema version too big";
header = 0x0F; // 0x08 | 0x07, seven bytes for the schema version
headerLen_ = 8;
}
Expand Down Expand Up @@ -139,7 +139,7 @@ RowWriterV2::RowWriterV2(RowReader& reader) : RowWriterV2(reader.getSchema()) {
set(i, v.moveDuration());
break;
default:
LOG(DFATAL) << "Invalid data: " << v << ", type: " << v.typeName();
LOG(FATAL) << "Invalid data: " << v << ", type: " << v.typeName();
isSet_[i] = false;
continue;
}
Expand Down Expand Up @@ -856,9 +856,9 @@ WriteResult RowWriterV2::checkUnsetFields() noexcept {
r = write(i, defVal.getDuration());
break;
default:
LOG(DFATAL) << "Unsupported default value type: " << defVal.typeName()
<< ", default value: " << defVal
<< ", default value expr: " << field->defaultValue();
LOG(FATAL) << "Unsupported default value type: " << defVal.typeName()
<< ", default value: " << defVal
<< ", default value expr: " << field->defaultValue();
return WriteResult::TYPE_MISMATCH;
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/Arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void* Arena::allocateAligned(const std::size_t alloc) {
kAlignment - (reinterpret_cast<uintptr_t>(currentPtr_) & (kAlignment - 1));
const std::size_t consumption = alloc + pad;
if (UNLIKELY(consumption > kMaxChunkSize)) {
LOG(DFATAL) << "Arena can't allocate so large memory.";
DLOG(FATAL) << "Arena can't allocate so large memory.";
return nullptr;
}
if (LIKELY(consumption <= availableSize_)) {
Expand Down
2 changes: 1 addition & 1 deletion src/common/base/Status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const char *Status::toString(Code code) {
case kSessionNotFound:
return "SessionNotFound";
}
LOG(DFATAL) << "Invalid status code: " << static_cast<uint16_t>(code);
DLOG(FATAL) << "Invalid status code: " << static_cast<uint16_t>(code);
return "";
}

Expand Down
26 changes: 13 additions & 13 deletions src/common/datatypes/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1507,7 +1507,7 @@ folly::dynamic Value::toJson() const {
// no default so the compiler will warning when lack
}

LOG(DFATAL) << "Unknown value type " << static_cast<int>(type_);
DLOG(FATAL) << "Unknown value type " << static_cast<int>(type_);
return folly::dynamic(nullptr);
}

Expand Down Expand Up @@ -1553,7 +1553,7 @@ folly::dynamic Value::getMetaData() const {
break;
}

LOG(DFATAL) << "Unknown value type " << static_cast<int>(type_);
DLOG(FATAL) << "Unknown value type " << static_cast<int>(type_);
return folly::dynamic(nullptr);
}

Expand Down Expand Up @@ -1581,7 +1581,7 @@ std::string Value::toString() const {
case NullType::OUT_OF_RANGE:
return "__NULL_OUT_OF_RANGE__";
}
LOG(DFATAL) << "Unknown Null type " << static_cast<int>(getNull());
DLOG(FATAL) << "Unknown Null type " << static_cast<int>(getNull());
return "__NULL_BAD_TYPE__";
}
case Value::Type::BOOL: {
Expand Down Expand Up @@ -1635,7 +1635,7 @@ std::string Value::toString() const {
// no default so the compiler will warning when lack
}

LOG(DFATAL) << "Unknown value type " << static_cast<int>(type_);
DLOG(FATAL) << "Unknown value type " << static_cast<int>(type_);
return "__NULL_BAD_TYPE__";
}

Expand Down Expand Up @@ -1858,7 +1858,7 @@ Value Value::lessThan(const Value& v) const {
return kNullBadType;
}
}
LOG(DFATAL) << "Unknown type " << static_cast<int>(v.type());
DLOG(FATAL) << "Unknown type " << static_cast<int>(v.type());
return Value::kNullBadType;
}

Expand Down Expand Up @@ -1957,7 +1957,7 @@ Value Value::equal(const Value& v) const {
return false;
}
}
LOG(DFATAL) << "Unknown type " << static_cast<int>(v.type());
DLOG(FATAL) << "Unknown type " << static_cast<int>(v.type());
return Value::kNullBadType;
}

Expand All @@ -1979,7 +1979,7 @@ bool Value::implicitBool() const {
case Type::LIST:
return !getList().empty();
default:
LOG(DFATAL) << "Impossible to reach here!";
DLOG(FATAL) << "Impossible to reach here!";
return false;
}
}
Expand Down Expand Up @@ -2262,7 +2262,7 @@ Value operator+(const Value& lhs, const Value& rhs) {
return Value::kNullValue;
}
}
LOG(DFATAL) << "Unknown type: " << rhs.type();
DLOG(FATAL) << "Unknown type: " << rhs.type();
return Value::kNullBadType;
}
case Value::Type::VERTEX: {
Expand Down Expand Up @@ -2696,15 +2696,15 @@ bool operator<(const Value& lhs, const Value& rhs) {
return lhs.getGeography() < rhs.getGeography();
}
case Value::Type::DURATION: {
LOG(DFATAL) << "Duration is not comparable.";
DLOG(FATAL) << "Duration is not comparable.";
return false;
}
case Value::Type::NULLVALUE:
case Value::Type::__EMPTY__: {
return false;
}
}
LOG(DFATAL) << "Unknown type " << static_cast<int>(lType);
DLOG(FATAL) << "Unknown type " << static_cast<int>(lType);
return false;
}

Expand Down Expand Up @@ -2800,7 +2800,7 @@ bool Value::equals(const Value& rhs) const {
return false;
}
}
LOG(DFATAL) << "Unknown type " << static_cast<int>(type());
DLOG(FATAL) << "Unknown type " << static_cast<int>(type());
return false;
}

Expand Down Expand Up @@ -2858,11 +2858,11 @@ std::size_t Value::hash() const {
return std::hash<Duration>()(getDuration());
}
case Type::DATASET: {
LOG(DFATAL) << "Hash for DATASET has not been implemented";
DLOG(FATAL) << "Hash for DATASET has not been implemented";
break;
}
default: {
LOG(DFATAL) << "Unknown type";
DLOG(FATAL) << "Unknown type";
}
}
return ~0UL;
Expand Down
6 changes: 3 additions & 3 deletions src/common/expression/ArithmeticExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Value& ArithmeticExpression::eval(ExpressionContext& ctx) {
result_ = lhs % rhs;
break;
default:
LOG(DFATAL) << "Unknown type: " << kind_;
DLOG(FATAL) << "Unknown type: " << kind_;
result_ = Value::kNullBadType;
}
return result_;
Expand All @@ -55,8 +55,8 @@ std::string ArithmeticExpression::toString() const {
op = "%";
break;
default:
LOG(DFATAL) << "Illegal kind for arithmetic expression: " << static_cast<int>(kind());
op = "illegal symbol ";
DLOG(FATAL) << "Illegal kind for arithmetic expression: " << static_cast<int>(kind());
op = " Invalid arithmetic expression ";
}
std::stringstream out;
out << "(" << (lhs_ ? lhs_->toString() : "") << op << (rhs_ ? rhs_->toString() : "") << ")";
Expand Down
10 changes: 5 additions & 5 deletions src/common/expression/Expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Expression* Expression::decode(ObjectPool* pool, Expression::Decoder& decoder) {
return exp;
}
case Expression::Kind::kInputProperty: {
LOG(DFATAL) << "Should not decode input property expression";
LOG(FATAL) << "Should not decode input property expression";
return exp;
}
case Expression::Kind::kVarProperty: {
Expand Down Expand Up @@ -459,7 +459,7 @@ Expression* Expression::decode(ObjectPool* pool, Expression::Decoder& decoder) {
return exp;
}
case Expression::Kind::kVersionedVar: {
LOG(DFATAL) << "Should not decode version variable expression";
LOG(FATAL) << "Should not decode version variable expression";
return exp;
}
case Expression::Kind::kUUID: {
Expand Down Expand Up @@ -516,17 +516,17 @@ Expression* Expression::decode(ObjectPool* pool, Expression::Decoder& decoder) {
case Expression::Kind::kTSWildcard:
case Expression::Kind::kTSRegexp:
case Expression::Kind::kTSFuzzy: {
LOG(DFATAL) << "Should not decode text search expression";
LOG(FATAL) << "Should not decode text search expression";
return exp;
}
case Expression::Kind::kMatchPathPattern: {
LOG(DFATAL) << "Should not decode match path pattern expression.";
LOG(FATAL) << "Should not decode match path pattern expression.";
return exp;
}
// no default so the compiler will warning when lack
}

LOG(DFATAL) << "Unknown expression: " << decoder.getHexStr();
LOG(FATAL) << "Unknown expression: " << decoder.getHexStr();
return exp;
}

Expand Down
6 changes: 3 additions & 3 deletions src/common/expression/LabelAttributeExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LabelAttributeExpression final : public Expression {
}

const Value& eval(ExpressionContext&) override {
DLOG(DFATAL) << "LabelAttributeExpression has to be rewritten";
DLOG(FATAL) << "LabelAttributeExpression has to be rewritten";
return Value::kNullBadData;
}

Expand Down Expand Up @@ -76,11 +76,11 @@ class LabelAttributeExpression final : public Expression {
}

void writeTo(Encoder&) const override {
LOG(DFATAL) << "LabelAttributeExpression not supported to encode.";
LOG(FATAL) << "LabelAttributeExpression not supported to encode.";
}

void resetFrom(Decoder&) override {
LOG(DFATAL) << "LabelAttributeExpression not supported to decode.";
LOG(FATAL) << "LabelAttributeExpression not supported to decode.";
}

private:
Expand Down
6 changes: 3 additions & 3 deletions src/common/expression/LogicalExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Value &LogicalExpression::eval(ExpressionContext &ctx) {
case Kind::kLogicalXor:
return evalXor(ctx);
default:
LOG(DFATAL) << "Illegal kind for logical expression: " << static_cast<int>(kind());
DLOG(FATAL) << "Illegal kind for logical expression: " << static_cast<int>(kind());
return Value::kNullBadType;
}
}
Expand Down Expand Up @@ -116,8 +116,8 @@ std::string LogicalExpression::toString() const {
op = " XOR ";
break;
default:
LOG(DFATAL) << "Illegal kind for logical expression: " << static_cast<int>(kind());
op = " illegal symbol ";
DLOG(FATAL) << "Illegal kind for logical expression: " << static_cast<int>(kind());
op = " Invalid logical expression ";
}
std::string buf;
buf.reserve(256);
Expand Down
2 changes: 1 addition & 1 deletion src/common/expression/LogicalExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class LogicalExpression final : public Expression {
} else if (kind_ == Kind::kLogicalOr) {
kind_ = Kind::kLogicalAnd;
} else {
LOG(DFATAL) << "Should not reverse logical expression except and/or kind.";
DLOG(FATAL) << "Should not reverse logical expression except and/or kind.";
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/common/expression/MatchPathPatternExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ class MatchPathPatternExpression final : public Expression {

// This expression contains variable implicitly, so we don't support persist or transform it.
void writeTo(Encoder&) const override {
LOG(DFATAL) << "Not implemented";
LOG(FATAL) << "Not implemented";
}

// This expression contains variable implicitly, so we don't support persist or transform it.
void resetFrom(Decoder&) override {
LOG(DFATAL) << "Not implemented";
LOG(FATAL) << "Not implemented";
}

private:
Expand Down
2 changes: 1 addition & 1 deletion src/common/expression/PropertyExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void PropertyExpression::resetFrom(Decoder& decoder) {
const Value& PropertyExpression::eval(ExpressionContext& ctx) {
// TODO maybe cypher need it.
UNUSED(ctx);
LOG(DFATAL) << "Unimplemented";
DLOG(FATAL) << "Unimplemented";
return Value::kNullBadType;
}

Expand Down
6 changes: 3 additions & 3 deletions src/common/expression/RelationalExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const Value& RelationalExpression::eval(ExpressionContext& ctx) {
break;
}
default:
LOG(DFATAL) << "Unknown type: " << kind_;
DLOG(FATAL) << "Unknown type: " << kind_;
result_ = Value::kNullBadType;
}
return result_;
Expand Down Expand Up @@ -250,8 +250,8 @@ std::string RelationalExpression::toString() const {
op = " NOT ENDS WITH ";
break;
default:
LOG(DFATAL) << "Illegal kind for relational expression: " << static_cast<int>(kind());
op = " illegal symbol ";
DLOG(FATAL) << "Illegal kind for relational expression: " << static_cast<int>(kind());
op = " Invalid relational expression ";
}
std::stringstream out;
out << "(" << (lhs_ ? lhs_->toString() : "") << op << (rhs_ ? rhs_->toString() : "") << ")";
Expand Down
4 changes: 2 additions & 2 deletions src/common/expression/TextSearchExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ std::string TextSearchExpression::toString() const {
break;
}
default: {
LOG(DFATAL) << "Illegal kind for text search expression: " << static_cast<int>(kind());
buf = "illegal symbol(";
DLOG(FATAL) << "Illegal kind for text search expression: " << static_cast<int>(kind());
buf = "invalid text search expression(";
}
}
buf += arg_ ? arg_->toString() : "";
Expand Down
Loading

0 comments on commit 0688dfa

Please sign in to comment.