fix: mndCheckTransConflict uses the same iterator variable
This commit is contained in:
parent
2f970dbc03
commit
13ec77e1f9
|
@ -855,15 +855,15 @@ static bool mndCheckTransConflict(SMnode *pMnode, STrans *pNew) {
|
||||||
if (pNew->conflict == TRN_CONFLICT_ARBGROUP) {
|
if (pNew->conflict == TRN_CONFLICT_ARBGROUP) {
|
||||||
if (pTrans->conflict == TRN_CONFLICT_GLOBAL) conflict = true;
|
if (pTrans->conflict == TRN_CONFLICT_GLOBAL) conflict = true;
|
||||||
if (pTrans->conflict == TRN_CONFLICT_ARBGROUP) {
|
if (pTrans->conflict == TRN_CONFLICT_ARBGROUP) {
|
||||||
pIter = taosHashIterate(pNew->arbGroupIds, NULL);
|
void* pGidIter = taosHashIterate(pNew->arbGroupIds, NULL);
|
||||||
while (pIter != NULL) {
|
while (pGidIter != NULL) {
|
||||||
int32_t groupId = *(int32_t *)pIter;
|
int32_t groupId = *(int32_t *)pGidIter;
|
||||||
if (taosHashGet(pTrans->arbGroupIds, &groupId, sizeof(int32_t)) != NULL) {
|
if (taosHashGet(pTrans->arbGroupIds, &groupId, sizeof(int32_t)) != NULL) {
|
||||||
taosHashCancelIterate(pNew->arbGroupIds, pIter);
|
taosHashCancelIterate(pNew->arbGroupIds, pGidIter);
|
||||||
conflict = true;
|
conflict = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pIter = taosHashIterate(pNew->arbGroupIds, pIter);
|
pGidIter = taosHashIterate(pNew->arbGroupIds, pGidIter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue