fix(meta): null txn after abort

This commit is contained in:
Minglei Jin 2023-09-11 08:55:30 +08:00
parent c90670ecdf
commit 443756c6ff
1 changed files with 8 additions and 1 deletions

View File

@ -61,5 +61,12 @@ int metaPrepareAsyncCommit(SMeta *pMeta) {
// abort the meta txn
int metaAbort(SMeta *pMeta) {
if (!pMeta->txn) return 0;
return tdbAbort(pMeta->pEnv, pMeta->txn);
int code = tdbAbort(pMeta->pEnv, pMeta->txn);
if (code) {
metaError("vgId:%d, failed to abort meta since %s", TD_VID(pMeta->pVnode), tstrerror(terrno));
} else {
pMeta->txn = NULL;
}
return code;
}