Fix _cache_wash_interval configuration and check next pointer before delete

This commit is contained in:
just-OneKey
2023-05-25 16:11:16 +00:00
committed by ob-robot
parent c93d41c488
commit a4c4a002a4
2 changed files with 5 additions and 2 deletions

View File

@ -232,7 +232,10 @@ int GlobalHazardVersion::delete_node(KVCacheHazardNode *node)
COMMON_LOG(WARN, "Fail to get thread store", K(ret));
} else {
node->set_version(ATOMIC_FAA(&version_, 1));
if (OB_FAIL(ts->delete_node(*node))) {
if (OB_UNLIKELY(nullptr != node->get_next())) {
COMMON_LOG(ERROR, "Unexpected hazard next", KPC(node));
ob_abort();
} else if (OB_FAIL(ts->delete_node(*node))) {
COMMON_LOG(WARN, "Fail to add node to threadstore", K(ret), K(*ts));
}
}

View File

@ -915,7 +915,7 @@ DEF_INT(_migrate_block_verify_level, OB_CLUSTER_PARAMETER, "1", "[0,2]",
"2 : logical verification",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_TIME(_cache_wash_interval, OB_CLUSTER_PARAMETER, "1s", "[1ms, 3s]",
DEF_TIME(_cache_wash_interval, OB_CLUSTER_PARAMETER, "200ms", "[1ms, 3s]",
"specify interval of cache background wash",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));