revert test code in ob_table_location.cpp
This commit is contained in:
@ -1009,16 +1009,15 @@ int ObTableLocation::init_table_location(ObExecContext &exec_ctx,
|
|||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
bool is_weak_read = false;
|
bool is_weak_read = false;
|
||||||
//if (OB_FAIL(get_is_weak_read(stmt,
|
if (OB_FAIL(get_is_weak_read(stmt,
|
||||||
// exec_ctx.get_my_session(),
|
exec_ctx.get_my_session(),
|
||||||
// exec_ctx.get_sql_ctx(),
|
exec_ctx.get_sql_ctx(),
|
||||||
// is_weak_read))) {
|
is_weak_read))) {
|
||||||
// LOG_WARN("get is weak read failed", K(ret));
|
LOG_WARN("get is weak read failed", K(ret));
|
||||||
//} else
|
} else if (ObDuplicateScope::DUPLICATE_SCOPE_NONE != table_schema->get_duplicate_scope()) {
|
||||||
|
|
||||||
if (ObDuplicateScope::DUPLICATE_SCOPE_NONE != table_schema->get_duplicate_scope()) {
|
|
||||||
loc_meta_.is_dup_table_ = 1;
|
loc_meta_.is_dup_table_ = 1;
|
||||||
}
|
}
|
||||||
|
if (OB_SUCC(ret)) {
|
||||||
if (is_dml_table) {
|
if (is_dml_table) {
|
||||||
loc_meta_.select_leader_ = 1;
|
loc_meta_.select_leader_ = 1;
|
||||||
} else if (!is_weak_read) {
|
} else if (!is_weak_read) {
|
||||||
@ -1028,6 +1027,7 @@ int ObTableLocation::init_table_location(ObExecContext &exec_ctx,
|
|||||||
loc_meta_.is_weak_read_ = 1;
|
loc_meta_.is_weak_read_ = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (OB_SUCC(ret) && PARTITION_LEVEL_TWO == table_schema->get_part_level()) {
|
if (OB_SUCC(ret) && PARTITION_LEVEL_TWO == table_schema->get_part_level()) {
|
||||||
const ObRawExpr *subpart_raw_expr = NULL;
|
const ObRawExpr *subpart_raw_expr = NULL;
|
||||||
if (OB_UNLIKELY(NULL == (subpart_raw_expr = stmt.get_subpart_expr(loc_meta_.table_loc_id_, loc_meta_.ref_table_id_)))) {
|
if (OB_UNLIKELY(NULL == (subpart_raw_expr = stmt.get_subpart_expr(loc_meta_.table_loc_id_, loc_meta_.ref_table_id_)))) {
|
||||||
@ -1348,6 +1348,8 @@ int ObTableLocation::get_is_weak_read(const ObDMLStmt &dml_stmt,
|
|||||||
dml_stmt.get_query_ctx()->is_contain_select_for_update_ ||
|
dml_stmt.get_query_ctx()->is_contain_select_for_update_ ||
|
||||||
dml_stmt.get_query_ctx()->is_contain_inner_table_) {
|
dml_stmt.get_query_ctx()->is_contain_inner_table_) {
|
||||||
is_weak_read = false;
|
is_weak_read = false;
|
||||||
|
} else if (share::ObTenantEnv::get_tenant() == nullptr) { //table api can't invoke MTL_IS_PRIMARY_TENANT
|
||||||
|
is_weak_read = false;
|
||||||
} else if (!MTL_IS_PRIMARY_TENANT()) {
|
} else if (!MTL_IS_PRIMARY_TENANT()) {
|
||||||
is_weak_read = true;
|
is_weak_read = true;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user