[CP] fix plan cache core at ref plan
This commit is contained in:
@ -63,13 +63,13 @@ deleting plan x |
|
|||||||
void ObCacheObjAtomicOp::operator()(ObjKV &entry)
|
void ObCacheObjAtomicOp::operator()(ObjKV &entry)
|
||||||
{
|
{
|
||||||
if (NULL != entry.second) {
|
if (NULL != entry.second) {
|
||||||
if (0 == entry.second->get_ref_count()) {
|
int64_t ref_cnt = entry.second->inc_ref_count(ref_handle_);
|
||||||
// do nothing
|
if (ref_cnt > 1) {
|
||||||
} else {
|
|
||||||
cache_obj_ = entry.second;
|
cache_obj_ = entry.second;
|
||||||
cache_obj_->inc_ref_count(ref_handle_);
|
} else {
|
||||||
|
cache_obj_ = nullptr;
|
||||||
}
|
}
|
||||||
SQL_PC_LOG(DEBUG, "succ to get plan", "ref_count", cache_obj_->get_ref_count());
|
SQL_PC_LOG(DEBUG, "succ to get plan");
|
||||||
} else {
|
} else {
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user