Merge pull request #23224 from taosdata/fix/TD-26681
fix: possible race condition
This commit is contained in:
commit
82c80fd34b
|
@ -794,7 +794,7 @@ int32_t tsdbCloseFS(STFileSystem **fs) {
|
|||
}
|
||||
|
||||
int64_t tsdbFSAllocEid(STFileSystem *fs) {
|
||||
taosThreadRwlockRdlock(&fs->tsdb->rwLock);
|
||||
taosThreadRwlockWrlock(&fs->tsdb->rwLock);
|
||||
int64_t cid = ++fs->neid;
|
||||
taosThreadRwlockUnlock(&fs->tsdb->rwLock);
|
||||
return cid;
|
||||
|
|
Loading…
Reference in New Issue