[TD-3653] <fix>: taosdemo json parameter cleanup. (#5665)
Co-authored-by: Shuduo Sang <sdsang@taosdata.com>
This commit is contained in:
parent
3d2706fea2
commit
945013bd11
|
@ -263,7 +263,6 @@ typedef struct SSuperTable_S {
|
|||
int lenOfTagOfOneRow;
|
||||
|
||||
char* sampleDataBuf;
|
||||
int sampleDataBufSize;
|
||||
//int sampleRowCount;
|
||||
//int sampleUsePos;
|
||||
|
||||
|
@ -3552,19 +3551,6 @@ static bool getMetaFromInsertJsonFile(cJSON* root) {
|
|||
goto PARSE_OVER;
|
||||
}
|
||||
|
||||
cJSON* sampleDataBufSize = cJSON_GetObjectItem(stbInfo, "sample_buf_size");
|
||||
if (sampleDataBufSize && sampleDataBufSize->type == cJSON_Number) {
|
||||
g_Dbs.db[i].superTbls[j].sampleDataBufSize = sampleDataBufSize->valueint;
|
||||
if (g_Dbs.db[i].superTbls[j].sampleDataBufSize < 1024*1024) {
|
||||
g_Dbs.db[i].superTbls[j].sampleDataBufSize = 1024*1024 + 1024;
|
||||
}
|
||||
} else if (!sampleDataBufSize) {
|
||||
g_Dbs.db[i].superTbls[j].sampleDataBufSize = 1024*1024 + 1024;
|
||||
} else {
|
||||
printf("ERROR: failed to read json, sample_buf_size not found\n");
|
||||
goto PARSE_OVER;
|
||||
}
|
||||
|
||||
cJSON *sampleFormat = cJSON_GetObjectItem(stbInfo, "sample_format");
|
||||
if (sampleFormat && sampleFormat->type
|
||||
== cJSON_String && sampleFormat->valuestring != NULL) {
|
||||
|
|
Loading…
Reference in New Issue