[CP] Auto Refresh/Broadcast Tablet Location
Co-authored-by: LeonChaoHi <15201161716@163.com>
This commit is contained in:
@ -362,10 +362,11 @@ TEST_F(TestLocationService, test_clear_tablet_ls_cache)
|
||||
ASSERT_TRUE(cache_size == cache_size_before_renew);
|
||||
|
||||
// test 1 million cache clear
|
||||
const bool update_only = false;
|
||||
for (int64_t i = 0; i < 1000000; ++i) {
|
||||
ObTabletLSCache cache;
|
||||
ASSERT_EQ(OB_SUCCESS, cache.init(tenant_id, ObTabletID(i+300000), ObLSID(1002), ObClockGenerator::getClock(), 1));
|
||||
ASSERT_EQ(OB_SUCCESS, tablet_ls_service->inner_cache_.update(cache));
|
||||
ASSERT_EQ(OB_SUCCESS, tablet_ls_service->inner_cache_.update(cache, update_only));
|
||||
}
|
||||
cache_size = tablet_ls_service->inner_cache_.size();
|
||||
ASSERT_TRUE(1000000 == cache_size - cache_size_before_renew);
|
||||
|
||||
@ -192,8 +192,9 @@ TEST_F(TestTabletAutoincMgr, test_lob_tablet_autoinc_location_cache)
|
||||
ASSERT_EQ(OB_SUCCESS, task.result_);
|
||||
|
||||
// restore old tablet ls cache
|
||||
const bool update_only = false;
|
||||
for (int64_t i = 0; i < old_tablet_ls_cache.count(); i++) {
|
||||
ASSERT_EQ(OB_SUCCESS, tablet_ls_service->update_cache_(old_tablet_ls_cache.at(i)));
|
||||
ASSERT_EQ(OB_SUCCESS, tablet_ls_service->update_cache(old_tablet_ls_cache.at(i), update_only));
|
||||
}
|
||||
|
||||
// remove source ls and clear src ls cache
|
||||
|
||||
Reference in New Issue
Block a user