Merge pull request #22824 from taosdata/fix/TD-26216
fix(meta): null txn after abort
This commit is contained in:
commit
c171311fc8
|
@ -61,5 +61,12 @@ int metaPrepareAsyncCommit(SMeta *pMeta) {
|
||||||
// abort the meta txn
|
// abort the meta txn
|
||||||
int metaAbort(SMeta *pMeta) {
|
int metaAbort(SMeta *pMeta) {
|
||||||
if (!pMeta->txn) return 0;
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue