提交 bd473f7e 编写于 作者: M Minglei Jin

fix: dismiss compiling issues

上级 f8be6486
......@@ -135,6 +135,7 @@ int32_t tsdbInsertTableData(STsdb* pTsdb, int64_t version, SSubmitMsgIter* p
int32_t tsdbDeleteTableData(STsdb* pTsdb, int64_t version, tb_uid_t suid, tb_uid_t uid, TSKEY sKey, TSKEY eKey);
STsdbReader tsdbQueryCacheLastT(STsdb* tsdb, SQueryTableDataCond* pCond, STableListInfo* tableList, uint64_t qId,
void* pMemRef);
int32_t tsdbSetKeepCfg(STsdb* pTsdb, STsdbCfg* pCfg);
// tq
int tqInit();
......
......@@ -15,11 +15,8 @@
#include "tsdb.h"
static int tsdbSetKeepCfg(STsdbKeepCfg *pKeepCfg, STsdbCfg *pCfg);
// implementation
static int tsdbSetKeepCfg(STsdbKeepCfg *pKeepCfg, STsdbCfg *pCfg) {
int32_t tsdbSetKeepCfg(STsdb *pTsdb, STsdbCfg *pCfg) {
STsdbKeepCfg *pKeepCfg = &pTsdb->keepCfg;
pKeepCfg->precision = pCfg->precision;
pKeepCfg->days = pCfg->days;
pKeepCfg->keep0 = pCfg->keep0;
......@@ -56,7 +53,7 @@ int tsdbOpen(SVnode *pVnode, STsdb **ppTsdb, const char *dir, STsdbKeepCfg *pKee
pTsdb->pVnode = pVnode;
taosThreadRwlockInit(&pTsdb->rwLock, NULL);
if (!pKeepCfg) {
tsdbSetKeepCfg(&pTsdb->keepCfg, &pVnode->config.tsdbCfg);
tsdbSetKeepCfg(pTsdb, &pVnode->config.tsdbCfg);
} else {
memcpy(&pTsdb->keepCfg, pKeepCfg, sizeof(STsdbKeepCfg));
}
......
......@@ -978,6 +978,7 @@ static int32_t vnodeProcessAlterHashRangeReq(SVnode *pVnode, int64_t version, vo
static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void *pReq, int32_t len, SRpcMsg *pRsp) {
SAlterVnodeReq alterReq = {0};
bool walChanged = false;
bool tsdbChanged = false;
if (tDeserializeSAlterVnodeReq(pReq, len, &alterReq) != 0) {
terrno = TSDB_CODE_INVALID_MSG;
......@@ -1010,26 +1011,30 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void
if (pVnode->config.tsdbCfg.keep0 != alterReq.daysToKeep0) {
pVnode->config.tsdbCfg.keep0 != alterReq.daysToKeep0;
if (!VND_IS_RSMA(pVnode)) {
pVnode->pTsdb->keepCfg.keep0 = alterReq.daysToKeep0;
tsdbChanged = true;
}
}
if (pVnode->config.tsdbCfg.keep1 != alterReq.daysToKeep1) {
pVnode->config.tsdbCfg.keep1 != alterReq.daysToKeep1;
if (!VND_IS_RSMA(pVnode)) {
pVnode->pTsdb->keepCfg.keep1 = alterReq.daysToKeep1;
tsdbChanged = true;
}
}
if (pVnode->config.tsdbCfg.keep2 != alterReq.daysToKeep2) {
pVnode->config.tsdbCfg.keep2 != alterReq.daysToKeep2;
if (!VND_IS_RSMA(pVnode)) {
pVnode->pTsdb->keepCfg.keep2 = alterReq.daysToKeep2;
tsdbChanged = true;
}
}
if (walChanged) {
walAlter(pVnode->pWal, pVnode->config.walCfg);
walAlter(pVnode->pWal, &pVnode->config.walCfg);
}
if (tsdbChanged) {
tsdbSetKeepCfg(pVnode->pTsdb, &pVnode->config.tsdbCfg);
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册