[CP] Fix the problem of still performing hard parsing when the SQL current limit reaches 0

This commit is contained in:
obdev
2024-02-07 13:03:27 +00:00
committed by ob-robot
parent d8b4a05f63
commit e633b2ae82
4 changed files with 23 additions and 5 deletions

View File

@ -692,7 +692,9 @@ int ObPhysicalPlan::inc_concurrent_num()
} else {
while(OB_SUCC(ret) && false == is_succ) {
concurrent_num = ATOMIC_LOAD(&concurrent_num_);
if (concurrent_num >= max_concurrent_num_) {
if (0 == max_concurrent_num_) {
ret = OB_REACH_MAX_CONCURRENT_NUM;
} else if (concurrent_num >= max_concurrent_num_) {
ret = OB_REACH_MAX_CONCURRENT_NUM;
} else {
new_num = concurrent_num + 1;