Merge pull request #27465 from taosdata/fix/TD-31668

Fix/TD-31668
This commit is contained in:
Hongze Cheng 2024-08-28 18:34:56 +08:00 committed by GitHub
commit 429b2fa87e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 25 deletions

View File

@ -277,24 +277,12 @@ bool transAsyncPoolIsEmpty(SAsyncPool* pool);
if (id > 0) { \ if (id > 0) { \
SExHandle* exh2 = transAcquireExHandle(transGetRefMgt(), id); \ SExHandle* exh2 = transAcquireExHandle(transGetRefMgt(), id); \
if (exh2 == NULL || id != exh2->refId) { \ if (exh2 == NULL || id != exh2->refId) { \
tTrace("handle %p except, may already freed, ignore msg, ref1:%" PRIu64 ", ref2:%" PRIu64, exh1, \ tDebug("ref:%" PRId64 " already released" PRIu64, id); \
exh2 ? exh2->refId : 0, id); \
code = terrno; \ code = terrno; \
goto _return1; \ goto _return1; \
} \ } \
} else if (id == 0) { \
tTrace("handle step2"); \
SExHandle* exh2 = transAcquireExHandle(transGetRefMgt(), id); \
if (exh2 == NULL || id == exh2->refId) { \
tTrace("handle %p except, may already freed, ignore msg, ref1:%" PRIu64 ", ref2:%" PRIu64, exh1, id, \
exh2 ? exh2->refId : 0); \
code = terrno; \
goto _return1; \
} else { \ } else { \
id = exh1->refId; \ tWarn("invalid handle to release"); \
} \
} else if (id < 0) { \
tTrace("handle step3"); \
goto _return2; \ goto _return2; \
} \ } \
} while (0) } while (0)