diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index 30bbaaae7390748a5fe791ed391b069599b96a3a..7290db6ec978b85ad71ea744b7ea37c6488cb9fa 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -210,8 +210,8 @@ extern int32_t debugFlag; extern char lossyColumns[]; extern double fPrecision; extern double dPrecision; -extern uint32_t maxIntervals; -extern uint32_t intervals; +extern uint32_t maxRange; +extern uint32_t curRange; extern char Compressor[]; #endif diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index d4c52c9d1fb5702c0571306f18458a935d902de2..34ccfbc3fe5c5279fd668663546c8064181daa13 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -252,8 +252,8 @@ char lossyColumns[32] = ""; // "float|double" means all float and double column // below option can take effect when tsLossyColumns not empty double fPrecision = 1E-8; // float column precision double dPrecision = 1E-16; // double column precision -uint32_t maxIntervals = 500; // max intervals -uint32_t intervals = 100; // intervals +uint32_t maxRange = 500; // max range +uint32_t curRange = 100; // range char Compressor[32] = "ZSTD_COMPRESSOR"; // ZSTD_COMPRESSOR or GZIP_COMPRESSOR #endif @@ -1565,8 +1565,8 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "maxIntervals"; - cfg.ptr = &maxIntervals; + cfg.option = "maxRange"; + cfg.ptr = &maxRange; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG; cfg.minValue = 0; @@ -1575,8 +1575,8 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "intervals"; - cfg.ptr = &intervals; + cfg.option = "range"; + cfg.ptr = &curRange; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG; cfg.minValue = 0; diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index 5a0743dd1b2ad97350c8b8f2ce57d91254d60eaf..02cf1c782c54f61e9bf113d7319e1009e4e7d946 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -1146,6 +1146,7 @@ static int32_t mnodeRetrieveConfigs(SShowObj *pShow, char *data, int32_t rows, v numOfRows++; break; case TAOS_CFG_VTYPE_FLOAT: + case TAOS_CFG_VTYPE_DOUBLE: t = snprintf(varDataVal(pWrite), TSDB_CFG_VALUE_LEN, "%f", *((float *)cfg->ptr)); varDataSetLen(pWrite, t); numOfRows++; diff --git a/src/util/src/tcompression.c b/src/util/src/tcompression.c index a11f6a2f3dabd94b3c73984ed0e78770a66cb32d..4472633304a9bcf78d25f55bf1efc5225244e7c2 100644 --- a/src/util/src/tcompression.c +++ b/src/util/src/tcompression.c @@ -85,7 +85,7 @@ int tsCompressInit(){ if(lossyFloat == false && lossyDouble == false) return 0; - tdszInit(fPrecision, dPrecision, maxIntervals, intervals, Compressor); + tdszInit(fPrecision, dPrecision, maxRange, curRange, Compressor); if(lossyFloat) uInfo("lossy compression float is opened. "); if(lossyDouble) diff --git a/src/util/src/tconfig.c b/src/util/src/tconfig.c index ea83debfdc2cba27e1f78d1ae7e7a7c29dbd6aec..5a3dc3f9bcdee41f974e48f22b27beb2a1eb5a35 100644 --- a/src/util/src/tconfig.c +++ b/src/util/src/tconfig.c @@ -484,6 +484,9 @@ void taosPrintGlobalCfg() { case TAOS_CFG_VTYPE_FLOAT: uInfo(" %s:%s%f%s", cfg->option, blank, *((float *)cfg->ptr), tsGlobalUnit[cfg->unitType]); break; + case TAOS_CFG_VTYPE_DOUBLE: + uInfo(" %s:%s%f%s", cfg->option, blank, *((double *)cfg->ptr), tsGlobalUnit[cfg->unitType]); + break; case TAOS_CFG_VTYPE_STRING: case TAOS_CFG_VTYPE_IPSTR: case TAOS_CFG_VTYPE_DIRECTORY: