remove unused code

This commit is contained in:
nroskill
2023-05-22 03:41:34 +00:00
committed by ob-robot
parent f8699503fa
commit b6cb96f6ce
123 changed files with 28 additions and 21432 deletions

View File

@ -29,7 +29,7 @@ ObMockIterator::ObMockIterator(bool reverse)
cursor_(0),
reverse_(reverse),
trans_id_(888),
allocator_(ObModIds::OB_ST_TEMP)
allocator_("StTemp")
{
}
@ -204,7 +204,7 @@ int ObMockIterator::from(const ObString &str, char escape, uint16_t *col_id_arra
{
int ret = OB_SUCCESS;
ObMockIteratorBuilder builder;
ObArenaAllocator buffer(ObModIds::OB_ST_TEMP);
ObArenaAllocator buffer("StTemp");
if (OB_SUCCESS != (ret != builder.init(&buffer, escape))) {
STORAGE_LOG(WARN, "init builder failed");
} else {

View File

@ -95,7 +95,7 @@ int TestHashMapPerformance::prepare_hash_map(const int64_t count, const double l
if (hash_map_.created()) {
hash_map_.destroy();
}
if (OB_FAIL(hash_map_.create(bucket_num, common::ObModIds::TEST_SERVICE, common::ObModIds::TEST_SERVICE))) {
if (OB_FAIL(hash_map_.create(bucket_num, "TestService", "TestService"))) {
STORAGE_LOG(WARN, "fail to create hash map", K(ret));
}
return ret;
@ -107,7 +107,7 @@ int TestHashMapPerformance::prepare_array_hash_map(const int64_t count, const do
const double bucket_num_tmp = load_factor * static_cast<double>(count);
const int64_t bucket_num = static_cast<int64_t>(bucket_num_tmp);
STORAGE_LOG(INFO, "array hash map bucket num", K(bucket_num));
if (OB_FAIL(array_hash_map_.init(common::ObModIds::TICKET_QUEUE, bucket_num))) {
if (OB_FAIL(array_hash_map_.init("TicketQueue", bucket_num))) {
STORAGE_LOG(WARN, "fail to create hash map", K(ret));
}
return ret;

View File

@ -32,7 +32,7 @@ const static int64_t DEF_COL_NUM = 4;
void check_row_fuse(const char *input, const char *expect)
{
int ret = OB_SUCCESS;
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
//const ObStoreRow *expect_row = NULL;
const ObStoreRow *input_row = NULL;
ObStoreRow *result = NULL;
@ -77,7 +77,7 @@ void check_row_fuse(const char *input, const char *expect)
void check_simple_row_fuse(const char *input, const char *expect)
{
int ret = OB_SUCCESS;
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
//const ObStoreRow *expect_row = NULL;
const ObStoreRow *input_row = NULL;
ObStoreRow *result = NULL;
@ -231,7 +231,7 @@ TEST(ObRowFuseTest, test_fuse_empty)
TEST(ObRowFuseTest, test_invalid_input_row)
{
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
char *input_ptr = (char *)allocator.alloc(OB_ROW_MAX_COLUMNS_COUNT * sizeof(ObObj) + sizeof(ObStoreRow));
char *result_ptr = (char *)allocator.alloc(OB_ROW_MAX_COLUMNS_COUNT * sizeof(ObObj) + sizeof(ObStoreRow));
ObStoreRow *input_row = new (input_ptr) ObStoreRow;
@ -255,7 +255,7 @@ TEST(ObRowFuseTest, test_invalid_input_row)
TEST(ObRowFuseTest, test_invalid_argument)
{
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
char *input_ptr = (char *)allocator.alloc(DEF_COL_NUM * sizeof(ObObj) + sizeof(ObStoreRow));
char *result_ptr = (char *)allocator.alloc(DEF_COL_NUM * sizeof(ObObj) + sizeof(ObStoreRow));
ObStoreRow *input_row = new (input_ptr) ObStoreRow;
@ -279,7 +279,7 @@ TEST(ObRowFuseTest, test_invalid_argument)
TEST(ObRowFuseTest, test_err_unexpected)
{
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
char *input_ptr = (char *)allocator.alloc(DEF_COL_NUM * sizeof(ObObj) + sizeof(ObStoreRow));
char *result_ptr = (char *)allocator.alloc(DEF_COL_NUM * sizeof(ObObj) + sizeof(ObStoreRow));
ObStoreRow *input_row = new (input_ptr) ObStoreRow;
@ -301,7 +301,7 @@ TEST(ObRowFuseTest, test_err_unexpected)
TEST(ObRowFuseTest, test_nop_pos)
{
ObNopPos nop_pos;
common::ObArenaAllocator allocator(ObModIds::OB_ST_TEMP);
common::ObArenaAllocator allocator("StTemp");
// ASSERT_EQ(OB_ALLOCATE_MEMORY_FAILED, nop_pos.init(LONG_MAX));
ASSERT_EQ(OB_SUCCESS, nop_pos.init(allocator, 256));
}