add retry when receiving reconfigure table error

This commit is contained in:
dapan1121 2020-12-26 08:23:51 +00:00
parent 960e8c0394
commit dbfa9a0b30
1 changed files with 18 additions and 6 deletions

View File

@ -1413,6 +1413,17 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int code) {
if (taos_errno(pSql) != TSDB_CODE_SUCCESS) { // handle error
assert(taos_errno(pSql) == code);
do {
if (code == TSDB_CODE_TDB_TABLE_RECONFIGURE) {
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;
}
}
taos_free_result(pSql);
tfree(pSupporter);
fclose(fp);
@ -1420,6 +1431,7 @@ static void parseFileSendDataBlock(void *param, TAOS_RES *tres, int code) {
pParentSql->res.code = code;
tscQueueAsyncRes(pParentSql);
return;
} while (0);
}
// accumulate the total submit records