[CP] [OBKV] Fix operation with lob object report -4016 when local retrying & core when print request

Co-authored-by: IHEII <602280108@qq.com>
This commit is contained in:
shenyunlong.syl
2024-02-05 09:47:13 +00:00
committed by ob-robot
parent d2c385703b
commit 0562c99d51
5 changed files with 18 additions and 24 deletions

View File

@ -262,10 +262,10 @@ int ObTableBatchExecuteP::try_process()
#ifndef NDEBUG
// debug mode
LOG_INFO("[TABLE] execute batch operation", K(ret), K_(arg), K_(result), "timeout", rpc_pkt_->get_timeout(), K_(retry_count));
LOG_INFO("[TABLE] execute batch operation", K(ret), K_(result), K_(retry_count));
#else
// release mode
LOG_TRACE("[TABLE] execute batch operation", K(ret), K_(arg), K_(result), "timeout", rpc_pkt_->get_timeout(), K_(retry_count),
LOG_TRACE("[TABLE] execute batch operation", K(ret), K_(result), K_(retry_count),
"receive_ts", get_receive_timestamp());
#endif
return ret;

View File

@ -16,6 +16,7 @@
#include "sql/code_generator/ob_static_engine_cg.h"
#include "share/system_variable/ob_system_variable.h" // for ObBinlogRowImage::FULL
#include "sql/engine/expr/ob_expr_autoinc_nextval.h" // for ObAutoincNextvalExtra
#include "sql/engine/expr/ob_expr_lob_utils.h"
using namespace oceanbase::common;
using namespace oceanbase::share;
@ -885,17 +886,15 @@ int ObTableExprCgService::write_datum(ObTableCtx &ctx,
{
int ret = OB_SUCCESS;
if (is_lob_storage(obj.get_type()) && (obj.has_lob_header() != expr.obj_meta_.has_lob_header())) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("fail to check lob header", K(ret), K(expr), K(obj));
ObDatum &datum = expr.locate_datum_for_write(eval_ctx);
if (OB_FAIL(datum.from_obj(obj))) {
LOG_WARN("fail to convert object from datum", K(ret), K(obj));
} else if (is_lob_storage(obj.get_type()) && OB_FAIL(ob_adjust_lob_datum(datum, obj.get_meta(), expr.obj_meta_, allocator))) {
// `ob_adjust_lob_datum()` will try to adjust datum form in_meta into out_meta
LOG_WARN("fail to adjust lob datum", K(ret), K(datum), K(obj));
} else {
ObDatum &datum = expr.locate_datum_for_write(eval_ctx);
if (OB_FAIL(datum.from_obj(obj))) {
LOG_WARN("fail to convert object from datum", K(ret), K(obj));
} else {
expr.get_eval_info(eval_ctx).evaluated_ = true;
expr.get_eval_info(eval_ctx).projected_ = true;
}
expr.get_eval_info(eval_ctx).evaluated_ = true;
expr.get_eval_info(eval_ctx).projected_ = true;
}
return ret;

View File

@ -479,15 +479,12 @@ int ObTableCtx::convert_lob(ObIAllocator &allocator, ObObj &obj)
{
int ret = OB_SUCCESS;
ObString full_data;
if (obj.is_persist_lob()) {
// do nothing
} else if (obj.has_lob_header()) {
} else if (obj.has_lob_header()) { // we add lob header in write_datum
ret = OB_ERR_UNEXPECTED;
LOG_USER_ERROR(OB_ERR_UNEXPECTED, "lob object should have lob header");
LOG_USER_ERROR(OB_ERR_UNEXPECTED, "lob object should not have lob header");
LOG_WARN("object should not have lob header", K(ret), K(obj));
} else if (OB_FAIL(ObTextStringResult::ob_convert_obj_temporay_lob(obj, allocator))) { // add lob header
LOG_WARN("fail to add lob header to obj", K(ret), K(obj));
}
return ret;

View File

@ -279,11 +279,11 @@ int ObTableApiExecuteP::try_process()
#ifndef NDEBUG
// debug mode
LOG_INFO("[TABLE] execute operation", K(ret), K_(arg), K_(result), "timeout", rpc_pkt_->get_timeout(), K_(retry_count));
LOG_INFO("[TABLE] execute operation", K(ret), K_(result), K_(retry_count));
#else
// release mode
LOG_TRACE("[TABLE] execute operation", K(ret), K_(arg), K_(result),
"timeout", rpc_pkt_->get_timeout(), "receive_ts", get_receive_timestamp(), K_(retry_count));
LOG_TRACE("[TABLE] execute operation", K(ret), K_(result),
"receive_ts", get_receive_timestamp(), K_(retry_count));
#endif
return ret;
}

View File

@ -1034,12 +1034,10 @@ int ObTableQueryAndMutateP::try_process()
}
#ifndef NDEBUG
// debug mode
LOG_INFO("[TABLE] execute query_and_mutate", K(ret), K_(arg), K(rpc_timeout),
K_(retry_count));
LOG_INFO("[TABLE] execute query_and_mutate", K(ret), K(rpc_timeout), K_(retry_count));
#else
// release mode
LOG_TRACE("[TABLE] execute query_and_mutate", K(ret), K_(arg),
K(rpc_timeout), K_(retry_count),
LOG_TRACE("[TABLE] execute query_and_mutate", K(ret), K(rpc_timeout), K_(retry_count),
"receive_ts", get_receive_timestamp());
#endif
return ret;