【part 1】Split session memory to tenants

This commit is contained in:
obdev
2023-06-15 09:48:00 +00:00
committed by ob-robot
parent ac9fb77cff
commit 20dd11d7a7
18 changed files with 286 additions and 250 deletions

View File

@ -109,9 +109,9 @@ void ObTenantCachedSchemaGuardInfo::try_revert_schema_guard()
}
}
ObSQLSessionInfo::ObSQLSessionInfo() :
ObSQLSessionInfo::ObSQLSessionInfo(const uint64_t tenant_id) :
ObVersionProvider(),
ObBasicSessionInfo(),
ObBasicSessionInfo(tenant_id),
is_inited_(false),
warnings_buf_(),
show_warnings_buf_(),
@ -204,18 +204,15 @@ int ObSQLSessionInfo::init(uint32_t sessid, uint64_t proxy_sessid,
} else if (FALSE_IT(txn_free_route_ctx_.set_sessid(sessid))) {
} else if (!is_acquire_from_pool() &&
OB_FAIL(package_state_map_.create(hash::cal_next_prime(4),
"PackStateMap",
"PackStateMap"))) {
ObMemAttr(orig_tenant_id_, "PackStateMap")))) {
LOG_WARN("create package state map failed", K(ret));
} else if (!is_acquire_from_pool() &&
OB_FAIL(sequence_currval_map_.create(hash::cal_next_prime(32),
"SequenceMap",
"SequenceMap"))) {
ObMemAttr(orig_tenant_id_, "SequenceMap")))) {
LOG_WARN("create sequence current value map failed", K(ret));
} else if (!is_acquire_from_pool() &&
OB_FAIL(contexts_map_.create(hash::cal_next_prime(32),
"ContextsMap",
"ContextsMap"))) {
ObMemAttr(orig_tenant_id_, "ContextsMap")))) {
LOG_WARN("create contexts map failed", K(ret));
} else {
curr_session_context_size_ = 0;