提交 bf9daf80 编写于 作者: G Ganlin Zhao

[TD-10773]<enhance>: add user configurable option smlChildTableName to

specify child table name instead using ID in tag field.
上级 d326cfc6
...@@ -231,6 +231,7 @@ extern int8_t tsDeadLockKillQuery; ...@@ -231,6 +231,7 @@ extern int8_t tsDeadLockKillQuery;
// schemaless // schemaless
extern char tsDefaultJSONStrType[]; extern char tsDefaultJSONStrType[];
extern char tsSmlChildTableName[];
typedef struct { typedef struct {
char dir[TSDB_FILENAME_LEN]; char dir[TSDB_FILENAME_LEN];
......
...@@ -286,6 +286,7 @@ int8_t tsDeadLockKillQuery = 0; ...@@ -286,6 +286,7 @@ int8_t tsDeadLockKillQuery = 0;
// default JSON string type // default JSON string type
char tsDefaultJSONStrType[7] = "binary"; char tsDefaultJSONStrType[7] = "binary";
char tsSmlChildTableName[TSDB_TABLE_NAME_LEN] = ""; //user defined child table name can be specified in tag value. If set to empty system will generate table name using MD5 hash.
int32_t (*monStartSystemFp)() = NULL; int32_t (*monStartSystemFp)() = NULL;
void (*monStopSystemFp)() = NULL; void (*monStopSystemFp)() = NULL;
...@@ -1653,6 +1654,17 @@ static void doInitGlobalConfig(void) { ...@@ -1653,6 +1654,17 @@ static void doInitGlobalConfig(void) {
cfg.unitType = TAOS_CFG_UTYPE_NONE; cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
// child talbe name specified in schemaless tag value
cfg.option = "smlChildTableName";
cfg.ptr = tsSmlChildTableName;
cfg.valType = TAOS_CFG_VTYPE_STRING;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW | TSDB_CFG_CTYPE_B_CLIENT;
cfg.minValue = 0;
cfg.maxValue = 0;
cfg.ptrLength = tListLen(tsSmlChildTableName);
cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosInitConfigOption(cfg);
// flush vnode wal file if walSize > walFlushSize and walSize > cache*0.5*blocks // flush vnode wal file if walSize > walFlushSize and walSize > cache*0.5*blocks
cfg.option = "walFlushSize"; cfg.option = "walFlushSize";
cfg.ptr = &tsdbWalFlushSize; cfg.ptr = &tsdbWalFlushSize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册