fix:[TS-2828] retry if ver is old
This commit is contained in:
parent
88c3d0d4b3
commit
d020753cdb
|
@ -1213,6 +1213,11 @@ static int32_t smlParseLineBottom(SSmlHandle *info) {
|
||||||
static int32_t smlInsertData(SSmlHandle *info) {
|
static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
|
if(info->pRequest->dbList == NULL){
|
||||||
|
info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN);
|
||||||
|
}
|
||||||
|
taosArrayPush(info->pRequest->dbList, info->pRequest->pDb);
|
||||||
|
|
||||||
SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL);
|
SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL);
|
||||||
while (oneTable) {
|
while (oneTable) {
|
||||||
SSmlTableInfo *tableData = *oneTable;
|
SSmlTableInfo *tableData = *oneTable;
|
||||||
|
@ -1221,6 +1226,11 @@ static int32_t smlInsertData(SSmlHandle *info) {
|
||||||
tstrncpy(pName.dbname, info->pRequest->pDb, sizeof(pName.dbname));
|
tstrncpy(pName.dbname, info->pRequest->pDb, sizeof(pName.dbname));
|
||||||
memcpy(pName.tname, tableData->childTableName, strlen(tableData->childTableName));
|
memcpy(pName.tname, tableData->childTableName, strlen(tableData->childTableName));
|
||||||
|
|
||||||
|
if(info->pRequest->tableList == NULL){
|
||||||
|
info->pRequest->tableList = taosArrayInit(1, sizeof(SName));
|
||||||
|
}
|
||||||
|
taosArrayPush(info->pRequest->tableList, &pName);
|
||||||
|
|
||||||
SRequestConnInfo conn = {0};
|
SRequestConnInfo conn = {0};
|
||||||
conn.pTrans = info->taos->pAppInfo->pTransporter;
|
conn.pTrans = info->taos->pAppInfo->pTransporter;
|
||||||
conn.requestId = info->pRequest->requestId;
|
conn.requestId = info->pRequest->requestId;
|
||||||
|
@ -1505,7 +1515,8 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine,
|
||||||
info->cost.code = code;
|
info->cost.code = code;
|
||||||
smlPrintStatisticInfo(info);
|
smlPrintStatisticInfo(info);
|
||||||
if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){
|
if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){
|
||||||
uInfo("SML:%"PRIx64" ver is old retry", info->id);
|
refreshMeta(request->pTscObj, request);
|
||||||
|
uInfo("SML:%"PRIx64" ver is old retry or object is creating:%d", info->id, code);
|
||||||
smlDestroyInfo(info);
|
smlDestroyInfo(info);
|
||||||
info = NULL;
|
info = NULL;
|
||||||
taos_free_result(request);
|
taos_free_result(request);
|
||||||
|
|
Loading…
Reference in New Issue