add retry when receiving reconfigure table error
This commit is contained in:
parent
960e8c0394
commit
dbfa9a0b30
|
@ -1413,13 +1413,25 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int code) {
|
||||||
if (taos_errno(pSql) != TSDB_CODE_SUCCESS) { // handle error
|
if (taos_errno(pSql) != TSDB_CODE_SUCCESS) { // handle error
|
||||||
assert(taos_errno(pSql) == code);
|
assert(taos_errno(pSql) == code);
|
||||||
|
|
||||||
taos_free_result(pSql);
|
do {
|
||||||
tfree(pSupporter);
|
if (code == TSDB_CODE_TDB_TABLE_RECONFIGURE) {
|
||||||
fclose(fp);
|
assert(pSql->res.numOfRows == 0);
|
||||||
|
int32_t errc = fseek(fp, 0, SEEK_SET);
|
||||||
|
if (errc < 0) {
|
||||||
|
tscError("%p failed to seek SEEK_SET since:%s", pSql, tstrerror(errno));
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pParentSql->res.code = code;
|
taos_free_result(pSql);
|
||||||
tscQueueAsyncRes(pParentSql);
|
tfree(pSupporter);
|
||||||
return;
|
fclose(fp);
|
||||||
|
|
||||||
|
pParentSql->res.code = code;
|
||||||
|
tscQueueAsyncRes(pParentSql);
|
||||||
|
return;
|
||||||
|
} while (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// accumulate the total submit records
|
// accumulate the total submit records
|
||||||
|
|
Loading…
Reference in New Issue