Merge pull request #19422 from taosdata/fix/TD-21756

fix(vnd/snap): keep vnode stats transfered from leader
This commit is contained in:
Shengliang Guan 2023-01-06 23:11:40 +08:00 committed by GitHub
commit 8ebd94aab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -406,8 +406,10 @@ static int32_t vnodeSnapWriteInfo(SVSnapWriter *pWriter, uint8_t *pData, uint32_
snprintf(dir, TSDB_FILENAME_LEN, "%s", pWriter->pVnode->path); snprintf(dir, TSDB_FILENAME_LEN, "%s", pWriter->pVnode->path);
} }
SVnodeStats vndStats = pWriter->info.config.vndStats;
SVnode *pVnode = pWriter->pVnode; SVnode *pVnode = pWriter->pVnode;
pWriter->info.config = pVnode->config; pWriter->info.config = pVnode->config;
pWriter->info.config.vndStats = vndStats;
vDebug("vgId:%d, save config while write snapshot", pWriter->pVnode->config.vgId); vDebug("vgId:%d, save config while write snapshot", pWriter->pVnode->config.vgId);
if (vnodeSaveInfo(dir, &pWriter->info) < 0) { if (vnodeSaveInfo(dir, &pWriter->info) < 0) {
code = terrno; code = terrno;