Retry compare_and_swap while disk hung

This commit is contained in:
godchen0212 2023-07-03 09:12:21 +00:00 committed by ob-robot
parent 95524f29e0
commit 241ebadaa1
2 changed files with 2 additions and 1 deletions

View File

@ -1791,7 +1791,7 @@ int ObTenantMetaMemMgr::compare_and_swap_tablet(
if (OB_FAIL(new_handle.get_obj()->check_and_set_initial_state())) {
LOG_WARN("failed to check and set initial state", K(ret), K(key));
}
} while (ret == OB_TIMEOUT || ret == OB_ALLOCATE_MEMORY_FAILED);
} while (OB_TIMEOUT == ret || OB_ALLOCATE_MEMORY_FAILED == ret || OB_DISK_HUNG == ret);
}
LOG_DEBUG("compare and swap object", K(ret), KPC(new_handle.get_obj()), K(lbt()));

View File

@ -5403,6 +5403,7 @@ int ObTablet::check_initial_state(bool &initial_state)
}
// TODO(@bowen.gbw): optimize, check initial state without IO
// TODO(@chenqingxiang.cqx): support using none addr to check initial state.
if (OB_FAIL(ret)) {
} else if (OB_FAIL(ObTabletMdsData::load_mds_dump_kv(arena_allocator, uncommitted_tablet_status_addr, uncommitted_kv))) {
LOG_WARN("failed to load mds dump kv", K(ret), K(uncommitted_tablet_status_addr));