fix(tdb): return success if txn is commited

This commit is contained in:
Minglei Jin 2023-02-02 17:51:04 +08:00
parent 69d6fb5bfe
commit 6cdfa6d60f
1 changed files with 5 additions and 0 deletions

View File

@ -457,6 +457,11 @@ int tdbPagerAbort(SPager *pPager, TXN *pTxn) {
SPgno journalSize = 0;
int ret;
if (pTxn->jfd == 0) {
// txn is commited
return 0;
}
// sync the journal file
ret = tdbOsFSync(pTxn->jfd);
if (ret < 0) {