fix tenant_role user primary as default

This commit is contained in:
maosy
2023-10-16 09:09:00 +00:00
committed by ob-robot
parent 03bb761572
commit ceaef5c7da
29 changed files with 84 additions and 51 deletions

View File

@ -1352,9 +1352,9 @@ 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_inner_table_) {
is_weak_read = false;
} else if (share::ObTenantEnv::get_tenant() == nullptr) { //table api can't invoke MTL_IS_PRIMARY_TENANT
} else if (share::ObTenantEnv::get_tenant() == nullptr) { //table api can't invoke MTL_TENANT_ROLE_CACHE_IS_PRIMARY_OR_INVALID
is_weak_read = false;
} else if (!MTL_IS_PRIMARY_TENANT()) {
} else if (!MTL_TENANT_ROLE_CACHE_IS_PRIMARY_OR_INVALID()) {
is_weak_read = true;
} else {
ObConsistencyLevel consistency_level = INVALID_CONSISTENCY;