fix bugs about medium checker
This commit is contained in:
@ -986,7 +986,7 @@ int ObMediumCompactionScheduleFunc::batch_check_medium_meta_table(
|
|||||||
const ObTabletInfo &tablet_info = tablet_infos.at(i);
|
const ObTabletInfo &tablet_info = tablet_infos.at(i);
|
||||||
const ObLSID &ls_id = tablet_info.get_ls_id();
|
const ObLSID &ls_id = tablet_info.get_ls_id();
|
||||||
const ObTabletID &tablet_id = tablet_info.get_tablet_id();
|
const ObTabletID &tablet_id = tablet_info.get_tablet_id();
|
||||||
const int64_t check_medium_scn = tablet_ls_infos.at(i).get_medium_scn();
|
const int64_t check_medium_scn = tablet_ls_info.get_medium_scn();
|
||||||
if (tablet_ls_info.get_ls_id() != ls_id
|
if (tablet_ls_info.get_ls_id() != ls_id
|
||||||
|| tablet_ls_info.get_tablet_id() != tablet_id) {
|
|| tablet_ls_info.get_tablet_id() != tablet_id) {
|
||||||
LOG_INFO("tablet_ls_info has been deleted", K(tablet_ls_info), K(tablet_info));
|
LOG_INFO("tablet_ls_info has been deleted", K(tablet_ls_info), K(tablet_info));
|
||||||
|
|||||||
@ -196,12 +196,8 @@ int ObTenantMediumChecker::add_tablet_ls(const ObTabletID &tablet_id, const shar
|
|||||||
LOG_WARN("fail to check ls status", K(ret), K(ls_id));
|
LOG_WARN("fail to check ls status", K(ret), K(ls_id));
|
||||||
} else if (is_leader) {
|
} else if (is_leader) {
|
||||||
lib::ObMutexGuard guard(lock_);
|
lib::ObMutexGuard guard(lock_);
|
||||||
if (OB_HASH_EXIST == (tmp_ret = tablet_ls_set_.exist_refactored(ObTabletCheckInfo(tablet_id, ls_id, medium_scn)))) {
|
// just cover the old info
|
||||||
ret = OB_SUCCESS; // tablet exist
|
if (OB_FAIL(tablet_ls_set_.set_refactored(ObTabletCheckInfo(tablet_id, ls_id, medium_scn)))) {
|
||||||
} else if (OB_UNLIKELY(OB_HASH_NOT_EXIST != tmp_ret)) {
|
|
||||||
ret = OB_ERR_UNEXPECTED;
|
|
||||||
LOG_WARN("failed to check exist in tablet set", K(ret), K(tmp_ret), K(ls_id), K(tablet_id));
|
|
||||||
} else if (OB_FAIL(tablet_ls_set_.set_refactored(ObTabletCheckInfo(tablet_id, ls_id, medium_scn)))) {
|
|
||||||
LOG_WARN("failed to set tablet_ls_info", K(ret), K(ls_id), K(tablet_id));
|
LOG_WARN("failed to set tablet_ls_info", K(ret), K(ls_id), K(tablet_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user