fix:[TS-3250] change strtegy in schemaless if modifyDBSchema error
This commit is contained in:
parent
95f4c81ac9
commit
3d8faa690d
|
@ -70,7 +70,7 @@ extern "C" {
|
||||||
#define VALUE_LEN 6
|
#define VALUE_LEN 6
|
||||||
|
|
||||||
#define OTD_JSON_FIELDS_NUM 4
|
#define OTD_JSON_FIELDS_NUM 4
|
||||||
#define MAX_RETRY_TIMES 100
|
#define MAX_RETRY_TIMES 10
|
||||||
typedef TSDB_SML_PROTOCOL_TYPE SMLProtocolType;
|
typedef TSDB_SML_PROTOCOL_TYPE SMLProtocolType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -535,7 +535,7 @@ static int32_t smlGenerateSchemaAction(SSchema *colField, SHashObj *colHash, SSm
|
||||||
if (index) {
|
if (index) {
|
||||||
if (colField[*index].type != kv->type) {
|
if (colField[*index].type != kv->type) {
|
||||||
uError("SML:0x%" PRIx64 " point type and db type mismatch. point type: %d, db type: %d, key: %s", info->id, colField[*index].type, kv->type, kv->key);
|
uError("SML:0x%" PRIx64 " point type and db type mismatch. point type: %d, db type: %d, key: %s", info->id, colField[*index].type, kv->type, kv->key);
|
||||||
return TSDB_CODE_TSC_INVALID_VALUE;
|
return TSDB_CODE_SML_INVALID_DATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((colField[*index].type == TSDB_DATA_TYPE_VARCHAR &&
|
if ((colField[*index].type == TSDB_DATA_TYPE_VARCHAR &&
|
||||||
|
@ -1494,8 +1494,8 @@ static int smlProcess(SSmlHandle *info, char *lines[], char *rawLine, char *rawL
|
||||||
|
|
||||||
do {
|
do {
|
||||||
code = smlModifyDBSchemas(info);
|
code = smlModifyDBSchemas(info);
|
||||||
if (code == 0) break;
|
if (code == 0 || code == TSDB_CODE_SML_INVALID_DATA) break;
|
||||||
taosMsleep(500);
|
taosMsleep(100);
|
||||||
uInfo("SML:0x%" PRIx64 " smlModifyDBSchemas retry code:%s, times:%d", info->id, tstrerror(code), retryNum);
|
uInfo("SML:0x%" PRIx64 " smlModifyDBSchemas retry code:%s, times:%d", info->id, tstrerror(code), retryNum);
|
||||||
} while (retryNum++ < taosHashGetSize(info->superTables) * MAX_RETRY_TIMES);
|
} while (retryNum++ < taosHashGetSize(info->superTables) * MAX_RETRY_TIMES);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue