Merge branch 'feature/3.0_liaohj' of github.com:taosdata/TDengine into feature/vnode
This commit is contained in:
commit
05bfb50d28
|
@ -29,7 +29,7 @@ int taos_options(TSDB_OPTION option, const void *arg, ...) {
|
||||||
|
|
||||||
// this function may be called by user or system, or by both simultaneously.
|
// this function may be called by user or system, or by both simultaneously.
|
||||||
void taos_cleanup(void) {
|
void taos_cleanup(void) {
|
||||||
tscDebug("start to cleanup client environment");
|
tscInfo("start to cleanup client environment");
|
||||||
|
|
||||||
if (atomic_val_compare_exchange_32(&sentinel, TSC_VAR_NOT_RELEASE, TSC_VAR_RELEASED) != TSC_VAR_NOT_RELEASE) {
|
if (atomic_val_compare_exchange_32(&sentinel, TSC_VAR_NOT_RELEASE, TSC_VAR_RELEASED) != TSC_VAR_NOT_RELEASE) {
|
||||||
return;
|
return;
|
||||||
|
@ -47,6 +47,8 @@ void taos_cleanup(void) {
|
||||||
|
|
||||||
rpcCleanup();
|
rpcCleanup();
|
||||||
taosCloseLog();
|
taosCloseLog();
|
||||||
|
|
||||||
|
tscInfo("all local resources released");
|
||||||
}
|
}
|
||||||
|
|
||||||
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) {
|
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) {
|
||||||
|
|
|
@ -456,15 +456,27 @@ int32_t schProcessOnTaskFailure(SSchJob *job, SSchTask *task, int32_t errCode) {
|
||||||
|
|
||||||
int32_t schProcessRspMsg(SSchJob *job, SSchTask *task, int32_t msgType, char *msg, int32_t msgSize, int32_t rspCode) {
|
int32_t schProcessRspMsg(SSchJob *job, SSchTask *task, int32_t msgType, char *msg, int32_t msgSize, int32_t rspCode) {
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
|
|
||||||
|
|
||||||
switch (msgType) {
|
switch (msgType) {
|
||||||
|
case TDMT_VND_CREATE_TABLE_RSP: {
|
||||||
|
if (rspCode != TSDB_CODE_SUCCESS) {
|
||||||
|
SCH_ERR_JRET(schProcessOnTaskFailure(job, task, rspCode));
|
||||||
|
} else {
|
||||||
|
// job->resNumOfRows += rsp->affectedRows;
|
||||||
|
code = schProcessOnTaskSuccess(job, task);
|
||||||
|
if (code) {
|
||||||
|
goto _task_error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
case TDMT_VND_SUBMIT_RSP: {
|
case TDMT_VND_SUBMIT_RSP: {
|
||||||
SShellSubmitRspMsg *rsp = (SShellSubmitRspMsg *)msg;
|
if (rspCode != TSDB_CODE_SUCCESS) {
|
||||||
if (rsp->code != TSDB_CODE_SUCCESS) {
|
SCH_ERR_JRET(schProcessOnTaskFailure(job, task, rspCode));
|
||||||
SCH_ERR_JRET(schProcessOnTaskFailure(job, task, rsp->code));
|
|
||||||
} else {
|
} else {
|
||||||
|
SShellSubmitRspMsg *rsp = (SShellSubmitRspMsg *)msg;
|
||||||
job->resNumOfRows += rsp->affectedRows;
|
job->resNumOfRows += rsp->affectedRows;
|
||||||
|
|
||||||
code = schProcessOnTaskSuccess(job, task);
|
code = schProcessOnTaskSuccess(job, task);
|
||||||
if (code) {
|
if (code) {
|
||||||
goto _task_error;
|
goto _task_error;
|
||||||
|
|
Loading…
Reference in New Issue