enh: batch create table
This commit is contained in:
parent
10c3eeef5c
commit
55ec5f164c
|
@ -178,6 +178,7 @@ extern int32_t tsMetaCacheMaxSize;
|
||||||
extern int32_t tsSlowLogThreshold;
|
extern int32_t tsSlowLogThreshold;
|
||||||
extern int32_t tsSlowLogScope;
|
extern int32_t tsSlowLogScope;
|
||||||
extern int32_t tsTimeSeriesThreshold;
|
extern int32_t tsTimeSeriesThreshold;
|
||||||
|
extern int64_t tsTimeSeriesInterval;
|
||||||
extern bool tsMultiResultFunctionStarReturnTags;
|
extern bool tsMultiResultFunctionStarReturnTags;
|
||||||
|
|
||||||
// client
|
// client
|
||||||
|
|
|
@ -181,6 +181,7 @@ int32_t tsMetaCacheMaxSize = -1; // MB
|
||||||
int32_t tsSlowLogThreshold = 3; // seconds
|
int32_t tsSlowLogThreshold = 3; // seconds
|
||||||
int32_t tsSlowLogScope = SLOW_LOG_TYPE_ALL;
|
int32_t tsSlowLogScope = SLOW_LOG_TYPE_ALL;
|
||||||
int32_t tsTimeSeriesThreshold = 50;
|
int32_t tsTimeSeriesThreshold = 50;
|
||||||
|
int64_t tsTimeSeriesInterval = 10; // ms
|
||||||
bool tsMultiResultFunctionStarReturnTags = false;
|
bool tsMultiResultFunctionStarReturnTags = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -783,6 +784,8 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
|
||||||
if (cfgAddInt32(pCfg, "timeseriesThreshold", tsTimeSeriesThreshold, 0, 2000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) !=
|
if (cfgAddInt32(pCfg, "timeseriesThreshold", tsTimeSeriesThreshold, 0, 2000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) !=
|
||||||
0)
|
0)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (cfgAddInt64(pCfg, "timeseriesInterval", tsTimeSeriesInterval, 1, 100, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER) != 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (cfgAddInt64(pCfg, "walFsyncDataSizeLimit", tsWalFsyncDataSizeLimit, 100 * 1024 * 1024, INT64_MAX,
|
if (cfgAddInt64(pCfg, "walFsyncDataSizeLimit", tsWalFsyncDataSizeLimit, 100 * 1024 * 1024, INT64_MAX,
|
||||||
CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0)
|
CFG_SCOPE_SERVER, CFG_DYN_NONE) != 0)
|
||||||
|
@ -1239,6 +1242,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
|
||||||
tsUptimeInterval = cfgGetItem(pCfg, "uptimeInterval")->i32;
|
tsUptimeInterval = cfgGetItem(pCfg, "uptimeInterval")->i32;
|
||||||
tsQueryRsmaTolerance = cfgGetItem(pCfg, "queryRsmaTolerance")->i32;
|
tsQueryRsmaTolerance = cfgGetItem(pCfg, "queryRsmaTolerance")->i32;
|
||||||
tsTimeSeriesThreshold = cfgGetItem(pCfg, "timeseriesThreshold")->i32;
|
tsTimeSeriesThreshold = cfgGetItem(pCfg, "timeseriesThreshold")->i32;
|
||||||
|
tsTimeSeriesInterval = cfgGetItem(pCfg, "timeseriesInterval")->i64;
|
||||||
|
|
||||||
tsWalFsyncDataSizeLimit = cfgGetItem(pCfg, "walFsyncDataSizeLimit")->i64;
|
tsWalFsyncDataSizeLimit = cfgGetItem(pCfg, "walFsyncDataSizeLimit")->i64;
|
||||||
|
|
||||||
|
@ -1557,6 +1561,7 @@ static int32_t taosCfgDynamicOptionsForServer(SConfig *pCfg, const char *name) {
|
||||||
{"numOfLogLines", &tsNumOfLogLines},
|
{"numOfLogLines", &tsNumOfLogLines},
|
||||||
{"queryRspPolicy", &tsQueryRspPolicy},
|
{"queryRspPolicy", &tsQueryRspPolicy},
|
||||||
{"timeseriesThreshold", &tsTimeSeriesThreshold},
|
{"timeseriesThreshold", &tsTimeSeriesThreshold},
|
||||||
|
{"timeseriesInterval", &tsTimeSeriesInterval},
|
||||||
{"tmqMaxTopicNum", &tmqMaxTopicNum},
|
{"tmqMaxTopicNum", &tmqMaxTopicNum},
|
||||||
{"tmqRowSize", &tmqRowSize},
|
{"tmqRowSize", &tmqRowSize},
|
||||||
{"transPullupInterval", &tsTransPullupInterval},
|
{"transPullupInterval", &tsTransPullupInterval},
|
||||||
|
|
|
@ -56,12 +56,17 @@ static void *dmNotifyThreadFp(void *param) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wait = true;
|
bool wait = true;
|
||||||
|
int64_t lastNotify = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
if (pMgmt->pData->dropped || pMgmt->pData->stopped) break;
|
if (pMgmt->pData->dropped || pMgmt->pData->stopped) break;
|
||||||
if (wait) tsem_wait(&dmNotifyHdl.sem);
|
if (wait) tsem_wait(&dmNotifyHdl.sem);
|
||||||
atomic_store_8(&dmNotifyHdl.state, 1);
|
atomic_store_8(&dmNotifyHdl.state, 1);
|
||||||
|
if (taosGetTimestampMs() - lastNotify < tsTimeSeriesInterval) {
|
||||||
|
taosMsleep(tsTimeSeriesInterval);
|
||||||
|
}
|
||||||
dmSendNotifyReq(pMgmt);
|
dmSendNotifyReq(pMgmt);
|
||||||
|
lastNotify = taosGetTimestampMs();
|
||||||
if (1 == atomic_val_compare_exchange_8(&dmNotifyHdl.state, 1, 0)) {
|
if (1 == atomic_val_compare_exchange_8(&dmNotifyHdl.state, 1, 0)) {
|
||||||
wait = true;
|
wait = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -96,6 +96,12 @@ class TDTestCase:
|
||||||
"values": [0, 200, 2000],
|
"values": [0, 200, 2000],
|
||||||
"except_values": [-2, 2001]
|
"except_values": [-2, 2001]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "timeseriesInterval",
|
||||||
|
"alias": "tsTimeSeriesInterval",
|
||||||
|
"values": [1, 10, 100],
|
||||||
|
"except_values": [-2, 2001]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "minDiskFreeSize",
|
"name": "minDiskFreeSize",
|
||||||
"alias": "tsMinDiskFreeSize",
|
"alias": "tsMinDiskFreeSize",
|
||||||
|
|
Loading…
Reference in New Issue