提交 4a376483 编写于 作者: A allenzhao

Fix/td 9125

上级 80644cdf
...@@ -948,8 +948,10 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) { ...@@ -948,8 +948,10 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
int32_t totalBlocks = htonl(pAlter->totalBlocks); int32_t totalBlocks = htonl(pAlter->totalBlocks);
int32_t daysPerFile = htonl(pAlter->daysPerFile); int32_t daysPerFile = htonl(pAlter->daysPerFile);
int32_t daysToKeep0 = htonl(pAlter->daysToKeep0); int32_t daysToKeep0 = htonl(pAlter->daysToKeep0);
#ifndef _STORAGE
int32_t daysToKeep1 = htonl(pAlter->daysToKeep1); int32_t daysToKeep1 = htonl(pAlter->daysToKeep1);
int32_t daysToKeep2 = htonl(pAlter->daysToKeep2); int32_t daysToKeep2 = htonl(pAlter->daysToKeep2);
#endif
int32_t minRows = htonl(pAlter->minRowsPerFileBlock); int32_t minRows = htonl(pAlter->minRowsPerFileBlock);
int32_t maxRows = htonl(pAlter->maxRowsPerFileBlock); int32_t maxRows = htonl(pAlter->maxRowsPerFileBlock);
int32_t commitTime = htonl(pAlter->commitTime); int32_t commitTime = htonl(pAlter->commitTime);
...@@ -1003,6 +1005,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) { ...@@ -1003,6 +1005,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
newCfg.daysToKeep0 = daysToKeep0; newCfg.daysToKeep0 = daysToKeep0;
} }
#ifndef _STORAGE
if (daysToKeep1 > 0 && (daysToKeep1 != pDb->cfg.daysToKeep1 || newCfg.daysToKeep1 != pDb->cfg.daysToKeep1)) { if (daysToKeep1 > 0 && (daysToKeep1 != pDb->cfg.daysToKeep1 || newCfg.daysToKeep1 != pDb->cfg.daysToKeep1)) {
mDebug("db:%s, daysToKeep1:%d change to %d", pDb->name, pDb->cfg.daysToKeep1, daysToKeep1); mDebug("db:%s, daysToKeep1:%d change to %d", pDb->name, pDb->cfg.daysToKeep1, daysToKeep1);
newCfg.daysToKeep1 = daysToKeep1; newCfg.daysToKeep1 = daysToKeep1;
...@@ -1012,6 +1015,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) { ...@@ -1012,6 +1015,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
mDebug("db:%s, daysToKeep2:%d change to %d", pDb->name, pDb->cfg.daysToKeep2, daysToKeep2); mDebug("db:%s, daysToKeep2:%d change to %d", pDb->name, pDb->cfg.daysToKeep2, daysToKeep2);
newCfg.daysToKeep2 = daysToKeep2; newCfg.daysToKeep2 = daysToKeep2;
} }
#endif
if (minRows > 0 && minRows != pDb->cfg.minRowsPerFileBlock) { if (minRows > 0 && minRows != pDb->cfg.minRowsPerFileBlock) {
mError("db:%s, can't alter minRows option", pDb->name); mError("db:%s, can't alter minRows option", pDb->name);
...@@ -1100,11 +1104,12 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) { ...@@ -1100,11 +1104,12 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
// community version can only change daysToKeep // community version can only change daysToKeep
// but enterprise version can change all daysToKeep options // but enterprise version can change all daysToKeep options
/*
#ifndef _STORAGE #ifndef _STORAGE
newCfg.daysToKeep1 = newCfg.daysToKeep0; newCfg.daysToKeep1 = newCfg.daysToKeep0;
newCfg.daysToKeep2 = newCfg.daysToKeep0; newCfg.daysToKeep2 = newCfg.daysToKeep0;
#endif #endif
*/
return newCfg; return newCfg;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册