提交 a780305e 编写于 作者: M Minglei Jin

tdb/begin: use txn id in mem

上级 50318f6f
...@@ -103,7 +103,7 @@ int32_t tdbBegin(TDB *pDb, TXN **ppTxn, void *(*xMalloc)(void *, size_t), void ( ...@@ -103,7 +103,7 @@ int32_t tdbBegin(TDB *pDb, TXN **ppTxn, void *(*xMalloc)(void *, size_t), void (
int flags) { int flags) {
SPager *pPager; SPager *pPager;
int ret; int ret;
int64_t txnId = 1; int64_t txnId = ++pDb->txnId;
TXN *pTxn = tdbOsCalloc(1, sizeof(*pTxn)); TXN *pTxn = tdbOsCalloc(1, sizeof(*pTxn));
if (!pTxn) { if (!pTxn) {
......
...@@ -382,6 +382,7 @@ struct STDB { ...@@ -382,6 +382,7 @@ struct STDB {
#ifdef USE_MAINDB #ifdef USE_MAINDB
TTB *pMainDb; TTB *pMainDb;
#endif #endif
int64_t txnId;
}; };
typedef struct hashset_st *hashset_t; typedef struct hashset_st *hashset_t;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册