Merge pull request #29627 from taosdata/fix/main/TS-5937

Fix merge errors from pr 29618.
This commit is contained in:
Hongze Cheng 2025-01-21 19:41:45 +08:00 committed by GitHub
commit c99a1c526c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -152,9 +152,9 @@ int64_t taosQueueMemorySize(STaosQueue *queue) {
int32_t taosAllocateQitem(int32_t size, EQItype itype, int64_t dataSize, void **item) { int32_t taosAllocateQitem(int32_t size, EQItype itype, int64_t dataSize, void **item) {
int64_t alloced = -1; int64_t alloced = -1;
if (alloced > tsQueueMemoryAllowed) { if (itype == RPC_QITEM) {
alloced = atomic_add_fetch_64(&tsQueueMemoryUsed, size + dataSize); alloced = atomic_add_fetch_64(&tsQueueMemoryUsed, size + dataSize);
if (itype == RPC_QITEM) { if (alloced > tsQueueMemoryAllowed) {
uError("failed to alloc qitem, size:%" PRId64 " alloc:%" PRId64 " allowed:%" PRId64, size + dataSize, alloced, uError("failed to alloc qitem, size:%" PRId64 " alloc:%" PRId64 " allowed:%" PRId64, size + dataSize, alloced,
tsQueueMemoryAllowed); tsQueueMemoryAllowed);
(void)atomic_sub_fetch_64(&tsQueueMemoryUsed, size + dataSize); (void)atomic_sub_fetch_64(&tsQueueMemoryUsed, size + dataSize);