[FEAT MERGE] merge transfer

Co-authored-by: wxhwang <wxhwang@126.com>
Co-authored-by: godyangfight <godyangfight@gmail.com>
Co-authored-by: Tyshawn <tuyunshan@gmail.com>
This commit is contained in:
xuhuleon
2023-06-21 11:42:26 +00:00
committed by ob-robot
parent d06678002e
commit 9dae112952
1280 changed files with 149724 additions and 48813 deletions

View File

@ -21,25 +21,6 @@ using namespace common;
using namespace storage;
using namespace compaction;
template <uint32_t SIZE>
int ObTabletStream::get_bucket_tablet_stat(
const ObTabletStatBucket<SIZE> &bucket,
common::ObIArray<ObTabletStat> &tablet_stats) const
{
int ret = OB_SUCCESS;
int64_t idx = bucket.head_idx_;
for (int64_t i = 0; OB_SUCC(ret) && i < bucket.count(); ++i) {
int64_t curr_idx = bucket.get_idx(idx);
if (OB_FAIL(tablet_stats.push_back(bucket.units_[curr_idx]))) {
LOG_WARN("failed to add tablet stat", K(ret), K(idx));
}
++idx;
}
return ret;
}
class TestTenantTabletStatMgr : public ::testing::Test
{
public:
@ -77,6 +58,7 @@ void TestTenantTabletStatMgr::TearDownTestCase()
void TestTenantTabletStatMgr::SetUp()
{
ASSERT_TRUE(MockTenantModuleEnv::get_instance().is_inited());
int ret = OB_SUCCESS;
ObTenantEnv::set_tenant(&tenant_base_);
@ -143,7 +125,7 @@ TEST_F(TestTenantTabletStatMgr, basic_tablet_stat_bucket)
tablet_stat.scan_physical_row_cnt_ = 100;
{
int64_t step = 1;
uint32_t step = 1;
ObTabletStatBucket<8> bucket(step);
ObTabletStat retired_stat;
bool has_retired = false;
@ -160,7 +142,7 @@ TEST_F(TestTenantTabletStatMgr, basic_tablet_stat_bucket)
}
{
int64_t step = 16;
uint32_t step = 16;
ObTabletStatBucket<4> bucket(step);
ObTabletStat retired_stat;
bool has_retired = false;
@ -179,7 +161,7 @@ TEST_F(TestTenantTabletStatMgr, basic_tablet_stat_bucket)
}
{
int64_t step = 32;
uint32_t step = 32;
ObTabletStatBucket<4> bucket(step);
ObTabletStat retired_stat;
bool has_retired = false;