Skip to content

Commit

Permalink
revise dfatal.
Browse files Browse the repository at this point in the history
  • Loading branch information
xtcyclist committed Jan 5, 2023
1 parent 07e3e92 commit bba41d1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 21 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
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
4 changes: 2 additions & 2 deletions src/common/expression/ArithmeticExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/common/expression/UnaryExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ std::string UnaryExpression::toString() const {
case Kind::kIsNotEmpty:
return (operand_ ? operand_->toString() : "") + " IS NOT EMPTY";
default:
LOG(DFATAL) << "Illegal kind for unary expression: " << static_cast<int>(kind());
op = "illegal symbol ";
DLOG(FATAL) << "Illegal kind for unary expression: " << static_cast<int>(kind());
op = " Invalid unary expression ";
}
std::stringstream out;
out << op << "(" << (operand_ ? operand_->toString() : "") << ")";
Expand Down
2 changes: 1 addition & 1 deletion src/meta/processors/schema/SchemaUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ bool SchemaUtil::checkType(std::vector<cpp2::ColumnDef>& columns) {
return false;
// no default so compiler will warning when lack
} // switch
LOG(DFATAL) << "Unknown property type " << static_cast<int>(column.get_type().get_type());
DLOG(FATAL) << "Unknown property type " << static_cast<int>(column.get_type().get_type());
return false;
}

Expand Down

0 comments on commit bba41d1

Please sign in to comment.