Skip to content

Commit

Permalink
Merge pull request #730 from taosdata/fix/benchIssue
Browse files Browse the repository at this point in the history
Fix/bench issue
  • Loading branch information
DuanKuanJun authored Jan 18, 2024
2 parents 58f0677 + 429662d commit 2139f2a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/benchCommandOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ void modifyArgument() {
}

if (superTable->iface == STMT_IFACE) {
if (g_arguments->reqPerReq > INT16_MAX) {
g_arguments->reqPerReq = INT16_MAX;
}
//if (g_arguments->reqPerReq > INT16_MAX) {
// g_arguments->reqPerReq = INT16_MAX;
//}
if (g_arguments->prepared_rand > g_arguments->reqPerReq) {
g_arguments->prepared_rand = g_arguments->reqPerReq;
}
Expand Down
4 changes: 2 additions & 2 deletions src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ static int generateRandDataSQL(SSuperTable *stbInfo, char *sampleDataBuf,
static int fillStmt(
SSuperTable *stbInfo,
char *sampleDataBuf,
int bufLen,
int64_t bufLen,
int lenOfOneRow, BArray *fields,
int64_t loop, bool tag, BArray *childCols) {
// fillStmt()
Expand All @@ -835,7 +835,7 @@ static int fillStmt(
if (childCols) {
childCol = benchArrayGet(childCols, i);
}
int n = 0;
int64_t n = 0;
switch (field->type) {
case TSDB_DATA_TYPE_BOOL: {
bool boolTmp = tmpBool(field);
Expand Down
8 changes: 4 additions & 4 deletions src/benchJsonOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ static int getStableInfo(tools_cJSON *dbinfos, int index) {
superTable->iface = REST_IFACE;
} else if (0 == strcasecmp(stbIface->valuestring, "stmt")) {
superTable->iface = STMT_IFACE;
if (g_arguments->reqPerReq > INT16_MAX) {
g_arguments->reqPerReq = INT16_MAX;
}
//if (g_arguments->reqPerReq > INT16_MAX) {
// g_arguments->reqPerReq = INT16_MAX;
//}
if (g_arguments->reqPerReq > g_arguments->prepared_rand) {
g_arguments->prepared_rand = g_arguments->reqPerReq;
}
Expand Down Expand Up @@ -1407,7 +1407,7 @@ static int getMetaFromInsertJsonFile(tools_cJSON *json) {
g_arguments->reqPerReq = DEFAULT_REQ_PER_REQ;
}

if (g_arguments->reqPerReq > 32768) {
if (g_arguments->reqPerReq > INT32_MAX) {
infoPrint("warning: num_of_records_per_req item in json config need less than 32768. current = %d. now reset to default.\n", g_arguments->reqPerReq);
g_arguments->reqPerReq = DEFAULT_REQ_PER_REQ;
}
Expand Down

0 comments on commit 2139f2a

Please sign in to comment.