From 9f0eb43164676fe8763dfeff90d63ced8416635e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 19 Aug 2021 10:57:23 +0800 Subject: [PATCH] add topicBianryLen config parameters for cenc --- src/common/inc/tglobal.h | 1 + src/common/src/tglobal.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index ed35168457..3c2069339a 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -158,6 +158,7 @@ extern char tsDataDir[]; extern char tsLogDir[]; extern char tsScriptDir[]; extern int64_t tsTickPerDay[3]; +extern int32_t tsTopicBianryLen; // system info extern char tsOsName[]; diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index e4ff353787..38ae56eb24 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -199,6 +199,7 @@ char tsScriptDir[PATH_MAX] = {0}; char tsTempDir[PATH_MAX] = "/tmp/"; int32_t tsDiskCfgNum = 0; +int32_t tsTopicBianryLen = 16000; #ifndef _STORAGE SDiskCfg tsDiskCfg[1]; @@ -1216,6 +1217,16 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); + cfg.option = "topicBianryLen"; + cfg.ptr = &tsTopicBianryLen; + cfg.valType = TAOS_CFG_VTYPE_INT32; + cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG; + cfg.minValue = 16; + cfg.maxValue = 16000; + cfg.ptrLength = 0; + cfg.unitType = TAOS_CFG_UTYPE_NONE; + taosInitConfigOption(cfg); + cfg.option = "httpEnableRecordSql"; cfg.ptr = &tsHttpEnableRecordSql; cfg.valType = TAOS_CFG_VTYPE_INT8; -- GitLab