未验证 提交 c0acf73c 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #12094 from taosdata/szhou/feature/sml-final

fix: schemaless performance
......@@ -149,7 +149,7 @@ int main(int argc, char* argv[]) {
int assembleSTables = 0;
int opt;
while ((opt = getopt(argc, argv, "s:c:r:f:t:b:p:w:hv")) != -1) {
while ((opt = getopt(argc, argv, "s:c:r:f:t:b:p:w:a:hv")) != -1) {
switch (opt) {
case 's':
numSuperTables = atoi(optarg);
......
......@@ -58,6 +58,22 @@ typedef enum {
SML_TIME_STAMP_NOW
} SMLTimeStampType;
typedef struct SSmlSqlInsertBatch {
uint64_t id;
int32_t index;
char* sql;
int32_t code;
int32_t tryTimes;
tsem_t sem;
int32_t affectedRows;
bool tryAgain;
bool resetQueryCache;
bool sleep;
} SSmlSqlInsertBatch;
#define MAX_SML_SQL_INSERT_BATCHES 512
typedef struct {
uint64_t id;
SMLProtocolType protocol;
......@@ -65,7 +81,13 @@ typedef struct {
SHashObj* smlDataToSchema;
int32_t affectedRows;
pthread_mutex_t batchMutex;
pthread_cond_t batchCond;
int32_t numBatches;
SSmlSqlInsertBatch batches[MAX_SML_SQL_INSERT_BATCHES];
} SSmlLinesInfo;
char* addEscapeCharToString(char *str, int32_t len);
int tscSmlInsert(TAOS* taos, TAOS_SML_DATA_POINT* points, int numPoint, SSmlLinesInfo* info);
bool checkDuplicateKey(char *key, SHashObj *pHash, SSmlLinesInfo* info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册