commit
8fcc1a06fd
|
@ -310,6 +310,7 @@ void tFreeStreamTask(SStreamTask* pTask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void streamFreeTaskState(SStreamTask* pTask, int8_t remove) {
|
void streamFreeTaskState(SStreamTask* pTask, int8_t remove) {
|
||||||
|
stDebug("s-task:0x%x start to free task state/backend", pTask->id.taskId);
|
||||||
if (pTask->pState != NULL) {
|
if (pTask->pState != NULL) {
|
||||||
stDebug("s-task:0x%x start to free task state", pTask->id.taskId);
|
stDebug("s-task:0x%x start to free task state", pTask->id.taskId);
|
||||||
streamStateClose(pTask->pState, remove);
|
streamStateClose(pTask->pState, remove);
|
||||||
|
@ -319,8 +320,11 @@ void streamFreeTaskState(SStreamTask* pTask, int8_t remove) {
|
||||||
pTask->pBackend = NULL;
|
pTask->pBackend = NULL;
|
||||||
pTask->pState = NULL;
|
pTask->pState = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
stDebug("s-task:0x%x task state is NULL, may del backend:%s", pTask->id.taskId,
|
||||||
|
pTask->backendPath ? pTask->backendPath : "NULL");
|
||||||
if (remove) {
|
if (remove) {
|
||||||
if (pTask->backendPath != NULL) {
|
if (pTask->backendPath != NULL) {
|
||||||
|
stDebug("s-task:0x%x task state is NULL, do del backend:%s", pTask->id.taskId, pTask->backendPath);
|
||||||
taosRemoveDir(pTask->backendPath);
|
taosRemoveDir(pTask->backendPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,11 +377,11 @@ int32_t streamTaskSetBackendPath(SStreamTask* pTask) {
|
||||||
int32_t taskId = 0;
|
int32_t taskId = 0;
|
||||||
|
|
||||||
if (pTask->info.fillHistory) {
|
if (pTask->info.fillHistory) {
|
||||||
streamId = pTask->hTaskInfo.id.taskId;
|
streamId = pTask->streamTaskId.streamId;
|
||||||
taskId = pTask->hTaskInfo.id.taskId;
|
|
||||||
} else {
|
|
||||||
streamId = pTask->streamTaskId.taskId;
|
|
||||||
taskId = pTask->streamTaskId.taskId;
|
taskId = pTask->streamTaskId.taskId;
|
||||||
|
} else {
|
||||||
|
streamId = pTask->id.streamId;
|
||||||
|
taskId = pTask->id.taskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
char id[128] = {0};
|
char id[128] = {0};
|
||||||
|
@ -393,6 +397,7 @@ int32_t streamTaskSetBackendPath(SStreamTask* pTask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)sprintf(pTask->backendPath, "%s%s%s", pTask->pMeta->path, TD_DIRSEP, id);
|
(void)sprintf(pTask->backendPath, "%s%s%s", pTask->pMeta->path, TD_DIRSEP, id);
|
||||||
|
stDebug("s-task:%s set backend path:%s", pTask->id.idStr, pTask->backendPath);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue