Merge pull request #23224 from taosdata/fix/TD-26681

fix: possible race condition
This commit is contained in:
Hongze Cheng 2023-10-11 20:07:29 -05:00 committed by GitHub
commit 82c80fd34b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;