fix drop db

This commit is contained in:
dmchen 2024-06-26 09:40:17 +00:00
parent 1d8c2fd923
commit e47968340d
3 changed files with 6 additions and 1 deletions

View File

@ -84,6 +84,7 @@ void mndTransSetParallel(STrans *pTrans);
void mndTransSetChangeless(STrans *pTrans);
void mndTransSetOper(STrans *pTrans, EOperType oper);
int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans);
int32_t mndTransCheckConflictWithCompact(SMnode *pMnode, STrans *pTrans);
#ifndef BUILD_NO_CALL
static int32_t mndTrancCheckConflict(SMnode *pMnode, STrans *pTrans) {
return mndTransCheckConflict(pMnode, pTrans);

View File

@ -897,6 +897,10 @@ int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans) {
return terrno;
}
return 0;
}
int32_t mndTransCheckConflictWithCompact(SMnode *pMnode, STrans *pTrans) {
void *pIter = NULL;
bool conflict = false;
SCompactObj *pCompact = NULL;

View File

@ -1954,7 +1954,7 @@ static int32_t mndRedistributeVgroup(SMnode *pMnode, SRpcMsg *pReq, SDbObj *pDb,
if (pTrans == NULL) goto _OVER;
mndTransSetDbName(pTrans, pVgroup->dbName, NULL);
if (mndTransCheckConflict(pMnode, pTrans) != 0) goto _OVER;
if (mndTransCheckConflictWithCompact(pMnode, pTrans) != 0) goto _OVER;
mndTransSetSerial(pTrans);
mInfo("trans:%d, used to redistribute vgroup, vgId:%d", pTrans->id, pVgroup->vgId);