Merge pull request #5471 from taosdata/hotfix/TD-3320

[TD-3320]<hotfix>: fix sync coredump
This commit is contained in:
Shengliang Guan 2021-03-19 09:43:42 +08:00 committed by GitHub
commit 7916c1df3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -677,13 +677,13 @@ static int32_t tsdbRecvDFileSetInfo(SSyncH *pSynch) {
static int tsdbReload(STsdbRepo *pRepo, bool isMfChanged) { static int tsdbReload(STsdbRepo *pRepo, bool isMfChanged) {
// TODO: may need to stop and restart stream // TODO: may need to stop and restart stream
if (isMfChanged) { // if (isMfChanged) {
tsdbCloseMeta(pRepo); tsdbCloseMeta(pRepo);
tsdbFreeMeta(pRepo->tsdbMeta); tsdbFreeMeta(pRepo->tsdbMeta);
pRepo->tsdbMeta = tsdbNewMeta(REPO_CFG(pRepo)); pRepo->tsdbMeta = tsdbNewMeta(REPO_CFG(pRepo));
tsdbOpenMeta(pRepo); tsdbOpenMeta(pRepo);
tsdbLoadMetaCache(pRepo, true); tsdbLoadMetaCache(pRepo, true);
} // }
tsdbUnRefMemTable(pRepo, pRepo->mem); tsdbUnRefMemTable(pRepo, pRepo->mem);
tsdbUnRefMemTable(pRepo, pRepo->imem); tsdbUnRefMemTable(pRepo, pRepo->imem);