This commit is contained in:
Hongze Cheng 2023-10-11 20:15:46 +08:00
parent 38b036ff36
commit 11aa9326b9
2 changed files with 13 additions and 8 deletions

View File

@ -793,7 +793,12 @@ int32_t tsdbCloseFS(STFileSystem **fs) {
return 0;
}
int64_t tsdbFSAllocEid(STFileSystem *fs) { return atomic_add_fetch_64(&fs->neid, 1); }
int64_t tsdbFSAllocEid(STFileSystem *fs) {
taosThreadRwlockWrlock(&fs->tsdb->rwLock);
int64_t cid = ++fs->neid;
taosThreadRwlockUnlock(&fs->tsdb->rwLock);
return cid;
}
int32_t tsdbFSEditBegin(STFileSystem *fs, const TFileOpArray *opArray, EFEditT etype) {
int32_t code = 0;

View File

@ -92,7 +92,7 @@ struct STFileSystem {
STsdb *tsdb;
tsem_t canEdit;
int32_t state;
volatile int64_t neid;
int64_t neid;
EFEditT etype;
TFileSetArray fSetArr[1];
TFileSetArray fSetArrTmp[1];