提交 6b454a4d 编写于 作者: H Hongze Cheng

more

上级 7721dae2
......@@ -279,21 +279,14 @@ typedef struct {
struct STsdb {
char *path;
SVnode *pVnode;
TdThreadRwlock rwLock;
STsdbKeepCfg keepCfg;
TdThreadRwlock rwLock;
SMemTable *mem;
SMemTable *imem;
STsdbFS *pFS;
SLRUCache *lruCache;
};
struct STable {
uint64_t suid;
uint64_t uid;
STSchema *pSchema; // latest schema
STSchema *pCacheSchema; // cached cache
};
struct TSDBKEY {
int64_t version;
TSKEY ts;
......
......@@ -960,10 +960,10 @@ static int32_t tsdbStartCommit(STsdb *pTsdb, SCommitter *pCommitter) {
memset(pCommitter, 0, sizeof(*pCommitter));
ASSERT(pTsdb->mem && pTsdb->imem == NULL);
// lock();
taosThreadRwlockWrlock(&pTsdb->rwLock);
pTsdb->imem = pTsdb->mem;
pTsdb->mem = NULL;
// unlock();
taosThreadRwlockUnlock(&pTsdb->rwLock);
pCommitter->pTsdb = pTsdb;
pCommitter->commitID = pTsdb->pVnode->state.commitID;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册