Merge pull request #25756 from taosdata/fix/TD-30001-3.0
fix: race condition in dumpConfToDataBlock
This commit is contained in:
commit
e1555ea2bc
|
@ -228,6 +228,8 @@ int32_t dumpConfToDataBlock(SSDataBlock* pBlock, int32_t startCol) {
|
||||||
blockDataEnsureCapacity(pBlock, cfgGetSize(pConf));
|
blockDataEnsureCapacity(pBlock, cfgGetSize(pConf));
|
||||||
SConfigIter* pIter = cfgCreateIter(pConf);
|
SConfigIter* pIter = cfgCreateIter(pConf);
|
||||||
|
|
||||||
|
cfgLock(pConf);
|
||||||
|
|
||||||
while ((pItem = cfgNextIter(pIter)) != NULL) {
|
while ((pItem = cfgNextIter(pIter)) != NULL) {
|
||||||
col = startCol;
|
col = startCol;
|
||||||
|
|
||||||
|
@ -253,6 +255,8 @@ int32_t dumpConfToDataBlock(SSDataBlock* pBlock, int32_t startCol) {
|
||||||
numOfRows++;
|
numOfRows++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cfgUnLock(pConf);
|
||||||
|
|
||||||
pBlock->info.rows = numOfRows;
|
pBlock->info.rows = numOfRows;
|
||||||
|
|
||||||
cfgDestroyIter(pIter);
|
cfgDestroyIter(pIter);
|
||||||
|
|
Loading…
Reference in New Issue