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

This commit is contained in:
obdev
2023-12-07 11:43:21 +00:00
committed by ob-robot
parent 655c8c0790
commit 121cb80b19
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;