[CP] fix flt control info not tenant isolate in sess level

This commit is contained in:
obdev
2023-10-08 13:43:13 +00:00
committed by ob-robot
parent 9fd28b2b4f
commit 700f533a73
2 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,9 @@ bool ObFLTResetSessOp::operator()(sql::ObSQLSessionMgr::Key key, ObSQLSessionInf
} else {
ret = OB_SUCCESS;
}
} else if (sess_info->get_effective_tenant_id() != tenant_id_) {
// do nothing
(void)sess_info->unlock_thread_data();
} else if (sess_info->is_coninfo_set_by_sess()) {
// already has, do nothing
(void)sess_info->unlock_thread_data();
@ -191,7 +194,7 @@ int ObFLTControlInfoManager::apply_control_info()
int ret = OB_SUCCESS;
sql::ObSQLSessionMgr *session_mgr = GCTX.session_mgr_;
ObFLTResetSessOp reset_op;
ObFLTResetSessOp reset_op(tenant_id_);
if (OB_ISNULL(session_mgr)) {
ret = OB_NOT_INIT;
SERVER_LOG(WARN, "sessionMgr is NULL", K(ret));

View File

@ -186,8 +186,10 @@ namespace sql
struct ObFLTResetSessOp {
public:
explicit ObFLTResetSessOp() {}
explicit ObFLTResetSessOp(uint64_t tenant_id) : tenant_id_(tenant_id){}
bool operator()(sql::ObSQLSessionMgr::Key key, ObSQLSessionInfo *sess_info);
private:
uint64_t tenant_id_;
};
} // namespace sql
} // namespace oceanbase