Merge branch '3.0' into enh/opt-transport

This commit is contained in:
yihaoDeng 2024-09-16 18:35:45 +08:00
parent ff1ac62183
commit b447c620e5
1 changed files with 5 additions and 1 deletions

View File

@ -3192,11 +3192,15 @@ static int32_t getOrCreateHeap(SHashObj* pConnHeapCache, char* key, SHeap** pHea
}
static FORCE_INLINE int8_t shouldSWitchToOtherConn(int32_t reqNum, int32_t sentNum, int32_t stateNum) {
int32_t total = reqNum + sentNum + stateNum;
int32_t total = reqNum + sentNum;
if (total >= BUFFER_LIMIT) {
return 1;
}
if (stateNum >= BUFFER_LIMIT * 2) {
return 1;
}
return 0;
}