[CP][Bugfix][OBKV]fix session pool hold too much memory when login frequently

This commit is contained in:
WeiXinChan
2024-01-17 08:43:54 +00:00
committed by ob-robot
parent e8d0e454bf
commit 9002e5b34d
3 changed files with 23 additions and 13 deletions

View File

@ -170,8 +170,7 @@ TEST_F(TestTableSessPool, mgr_update_session)
ASSERT_NE(nullptr, mgr->pool_);
ASSERT_TRUE(mgr->pool_->is_inited_);
ASSERT_EQ(1, mgr->pool_->key_node_map_.size());
ASSERT_EQ(1, mgr->pool_->retired_nodes_.size_);
ASSERT_EQ(node, mgr->pool_->retired_nodes_.get_last());
ASSERT_EQ(0, mgr->pool_->retired_nodes_.size_);
ASSERT_EQ(OB_SUCCESS, mgr->pool_->get_sess_node(new_cred->hash_val_, node));
ASSERT_NE(nullptr, node);
ASSERT_TRUE(node->sess_lists_.free_list_.is_empty());
@ -184,7 +183,7 @@ TEST_F(TestTableSessPool, mgr_update_session)
ASSERT_NE(nullptr, mgr->pool_);
ASSERT_TRUE(mgr->pool_->is_inited_);
ASSERT_EQ(2, mgr->pool_->key_node_map_.size());
ASSERT_EQ(1, mgr->pool_->retired_nodes_.size_);
ASSERT_EQ(0, mgr->pool_->retired_nodes_.size_);
ASSERT_EQ(OB_SUCCESS, mgr->pool_->get_sess_node(new_cred->hash_val_, node));
ASSERT_NE(nullptr, node);
ASSERT_TRUE(node->sess_lists_.free_list_.is_empty());