Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -24,7 +24,7 @@ namespace oceanbase
namespace sql
{
int ObLoadDataExecutor::check_is_direct_load(ObTableDirectInsertCtx &ctx, const ObLoadDataHint &load_hint)
int ObLoadDataExecutor::check_is_direct_load(const ObLoadDataHint &load_hint, bool &check_ret)
{
int ret = OB_SUCCESS;
int64_t enable_direct = 0;
@ -34,26 +34,25 @@ int ObLoadDataExecutor::check_is_direct_load(ObTableDirectInsertCtx &ctx, const
} else if (OB_FAIL(load_hint.get_value(ObLoadDataHint::APPEND, append))) {
LOG_WARN("fail to get value of APPEND", K(ret));
} else if ((enable_direct != 0 || append != 0) && GCONF._ob_enable_direct_load) {
ctx.set_is_direct(true);
check_ret = true;
} else {
ctx.set_is_direct(false);
check_ret = false;
}
LOG_INFO("check load data is direct done.", K(ctx.get_is_direct()));
return ret;
}
int ObLoadDataExecutor::execute(ObExecContext &ctx, ObLoadDataStmt &stmt)
{
int ret = OB_SUCCESS;
ObTableDirectInsertCtx &table_direct_insert_ctx = ctx.get_table_direct_insert_ctx();
ObLoadDataBase *load_impl = NULL;
bool is_direct_load = false;
if (!stmt.get_load_arguments().is_csv_format_) {
ret = OB_NOT_SUPPORTED;
LOG_WARN("invalid resolver results", K(ret));
} else if (OB_FAIL(check_is_direct_load(table_direct_insert_ctx, stmt.get_hints()))) {
} else if (OB_FAIL(check_is_direct_load(stmt.get_hints(), is_direct_load))) {
LOG_WARN("fail to check is load mode", KR(ret));
} else {
if (!table_direct_insert_ctx.get_is_direct()) {
if (!is_direct_load) {
if (OB_ISNULL(load_impl = OB_NEWx(ObLoadDataSPImpl, (&ctx.get_allocator())))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("allocate memory failed", K(ret));
@ -71,8 +70,6 @@ int ObLoadDataExecutor::execute(ObExecContext &ctx, ObLoadDataStmt &stmt)
if (OB_SUCC(ret)) {
if (OB_FAIL(load_impl->execute(ctx, stmt))) {
LOG_WARN("failed to execute load data stmt", K(ret));
} else {
LOG_TRACE("load data success");
}
load_impl->~ObLoadDataBase();
}