fix typo and uninitialized variable

This commit is contained in:
hiddenbomb
2024-01-11 10:43:51 +00:00
committed by ob-robot
parent 10ed343064
commit e7dad62eca
4 changed files with 27 additions and 28 deletions

View File

@ -1834,7 +1834,7 @@ int ObLSTabletService::replay_create_tablet(
ObTablet *tablet = nullptr;
int64_t pos = 0;
ObMetaDiskAddr old_addr;
ObTabletPoolType pool_type;
ObTabletPoolType pool_type(ObTabletPoolType::TP_MAX);
ObBucketHashWLockGuard lock_guard(bucket_lock_, tablet_id.hash());
time_guard.click("Lock");
if (OB_FAIL(ObTabletCreateDeleteHelper::create_tmp_tablet(key, allocator, tablet_hdl))) {
@ -1869,7 +1869,6 @@ int ObLSTabletService::replay_create_tablet(
}
if (OB_FAIL(ret)) {
// do nothing
} else if (OB_FAIL(t3m->compare_and_swap_tablet(key, old_addr, disk_addr, pool_type, true /* whether to set tablet pool */))) {
LOG_WARN("fail to compare and swap tablat in t3m", K(ret), K(key), K(old_addr), K(disk_addr));
} else if (FALSE_IT(time_guard.click("CASwap"))) {