[chore](log)Move non-user-friendly error message to be.WARNING (#22315)
Move non-user-friendly error message to be.WARNING
This commit is contained in:
@ -98,7 +98,6 @@ public:
|
||||
Status init_env() {
|
||||
std::string conffile = std::string(getenv("DORIS_HOME")) + "/conf/be.conf";
|
||||
if (!doris::config::init(conffile.c_str(), true, true, true)) {
|
||||
fprintf(stderr, "error read config file. \n");
|
||||
return Status::Error<INTERNAL_ERROR>("error read config file.");
|
||||
}
|
||||
doris::CpuInfo::init();
|
||||
|
||||
@ -61,7 +61,7 @@ Status DeleteHandler::generate_delete_predicate(const TabletSchema& schema,
|
||||
// Check whether the delete condition meets the requirements
|
||||
for (const TCondition& condition : conditions) {
|
||||
if (check_condition_valid(schema, condition) != Status::OK()) {
|
||||
LOG(WARNING) << "invalid condition. condition=" << ThriftDebugString(condition);
|
||||
// Error will print log, no need to do it manually.
|
||||
return Status::Error<DELETE_INVALID_CONDITION>("invalid condition. condition={}",
|
||||
ThriftDebugString(condition));
|
||||
}
|
||||
|
||||
@ -445,9 +445,6 @@ Status TabletReader::_init_orderby_keys_param(const ReaderParams& read_params) {
|
||||
}
|
||||
}
|
||||
if (read_params.read_orderby_key_num_prefix_columns != _orderby_key_columns.size()) {
|
||||
LOG(WARNING) << "read_orderby_key_num_prefix_columns != _orderby_key_columns.size "
|
||||
<< read_params.read_orderby_key_num_prefix_columns << " vs. "
|
||||
<< _orderby_key_columns.size();
|
||||
return Status::Error<ErrorCode::INTERNAL_ERROR>(
|
||||
"read_orderby_key_num_prefix_columns != _orderby_key_columns.size, "
|
||||
"read_params.read_orderby_key_num_prefix_columns={}, "
|
||||
|
||||
@ -618,7 +618,6 @@ Status BkdIndexReader::try_query(OlapReaderStatistics* stats, const std::string&
|
||||
}
|
||||
*count = r->estimate_point_count(visitor.get());
|
||||
} catch (const CLuceneError& e) {
|
||||
LOG(WARNING) << "BKD Query CLuceneError Occurred, error msg: " << e.what();
|
||||
return Status::Error<ErrorCode::INVERTED_INDEX_CLUCENE_ERROR>(
|
||||
"BKD Query CLuceneError Occurred, error msg: {}", e.what());
|
||||
}
|
||||
|
||||
@ -411,7 +411,7 @@ Status gen_timestamp_string(std::string* out_string) {
|
||||
if (localtime_r(&now, &local_tm) == nullptr) {
|
||||
return Status::Error<OS_ERROR>("fail to localtime_r time. time={}", now);
|
||||
}
|
||||
char time_suffix[16] = {0}; // Example: 20150706111404, 长度是15个字符
|
||||
char time_suffix[16] = {0}; // Example: 20150706111404's length is 15
|
||||
if (strftime(time_suffix, sizeof(time_suffix), "%Y%m%d%H%M%S", &local_tm) == 0) {
|
||||
return Status::Error<OS_ERROR>("fail to strftime time. time={}", now);
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include "common/config.h"
|
||||
#include "common/exception.h"
|
||||
#include "common/object_pool.h"
|
||||
#include "common/status.h"
|
||||
#include "vec/columns/column_vector.h"
|
||||
#include "vec/columns/columns_number.h"
|
||||
#include "vec/data_types/data_type_factory.hpp"
|
||||
@ -212,8 +213,13 @@ Status VExpr::create_expr(const TExprNode& expr_node, VExprSPtr& expr) {
|
||||
return Status::InternalError("Unknown expr node type: {}", expr_node.node_type);
|
||||
}
|
||||
} catch (const Exception& e) {
|
||||
return Status::InternalError("create expr failed, TExprNode={}, reason={}",
|
||||
apache::thrift::ThriftDebugString(expr_node), e.what());
|
||||
if (e.code() == ErrorCode::INTERNAL_ERROR) {
|
||||
return Status::InternalError("Create Expr failed because {}\nTExprNode={}", e.what(),
|
||||
apache::thrift::ThriftDebugString(expr_node));
|
||||
}
|
||||
return Status::Error<false>(e.code(), "Create Expr failed because {}", e.what());
|
||||
LOG(WARNING) << "create expr failed, TExprNode={}, reason={}"
|
||||
<< apache::thrift::ThriftDebugString(expr_node) << e.what();
|
||||
}
|
||||
if (!expr->data_type()) {
|
||||
return Status::InvalidArgument("Unknown expr type: {}", expr_node.node_type);
|
||||
|
||||
@ -684,13 +684,15 @@ public class ScalarType extends Type {
|
||||
case DECIMAL64:
|
||||
case DECIMAL128:
|
||||
case DATETIMEV2: {
|
||||
Preconditions.checkArgument(precision >= scale);
|
||||
Preconditions.checkArgument(precision >= scale,
|
||||
String.format("given precision %d is out of scale bound %d", precision, scale));
|
||||
scalarType.setScale(scale);
|
||||
scalarType.setPrecision(precision);
|
||||
break;
|
||||
}
|
||||
case TIMEV2: {
|
||||
Preconditions.checkArgument(precision >= scale);
|
||||
Preconditions.checkArgument(precision >= scale,
|
||||
String.format("given precision %d is out of scale bound %d", precision, scale));
|
||||
scalarType.setScale(scale);
|
||||
scalarType.setPrecision(precision);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user