Merge pull request #23598 from taosdata/fix/fixStreamTransferErrMain
Fix/fix stream transfer err main
This commit is contained in:
commit
056a225604
|
@ -51,6 +51,7 @@ struct SStreamSnapHandle {
|
|||
int8_t filetype;
|
||||
SArray* pFileList;
|
||||
int32_t currFileIdx;
|
||||
int8_t delFlag;
|
||||
};
|
||||
struct SStreamSnapBlockHdr {
|
||||
int8_t type;
|
||||
|
@ -147,6 +148,7 @@ int32_t streamSnapHandleInit(SStreamSnapHandle* pHandle, char* path, int64_t chk
|
|||
taosMemoryFree(tdir);
|
||||
return code;
|
||||
}
|
||||
pHandle->delFlag = 1;
|
||||
chkpId = 0;
|
||||
}
|
||||
|
||||
|
@ -273,7 +275,7 @@ void streamSnapHandleDestroy(SStreamSnapHandle* handle) {
|
|||
if (handle->checkpointId == 0) {
|
||||
// del tmp dir
|
||||
if (pFile && taosIsDir(pFile->path)) {
|
||||
taosRemoveDir(pFile->path);
|
||||
if (handle->delFlag) taosRemoveDir(pFile->path);
|
||||
}
|
||||
} else {
|
||||
streamBackendDelInUseChkp(handle->handle, handle->checkpointId);
|
||||
|
|
Loading…
Reference in New Issue