Merge pull request #25578 from taosdata/fix/TD-29325
fix(tdb/btc): free txn early when closing btc
This commit is contained in:
commit
c923faa4bf
|
@ -2475,7 +2475,12 @@ int tdbBtcMoveTo(SBTC *pBtc, const void *pKey, int kLen, int *pCRst) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int tdbBtcClose(SBTC *pBtc) {
|
int tdbBtcClose(SBTC *pBtc) {
|
||||||
if (pBtc->iPage < 0) return 0;
|
if (pBtc->iPage < 0) {
|
||||||
|
if (pBtc->freeTxn) {
|
||||||
|
tdbTxnClose(pBtc->pTxn);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (NULL == pBtc->pPage) {
|
if (NULL == pBtc->pPage) {
|
||||||
|
|
Loading…
Reference in New Issue