opt checkpoint

This commit is contained in:
Yihao Deng 2024-05-17 14:21:04 +08:00
parent a7b434075b
commit b0377a2e3a
1 changed files with 3 additions and 1 deletions

View File

@ -74,6 +74,7 @@ struct SStreamSnapHandle {
int32_t currFileIdx; int32_t currFileIdx;
char* metaPath; char* metaPath;
void* pMeta;
SArray* pDbSnapSet; SArray* pDbSnapSet;
SArray* pSnapInfoSet; SArray* pSnapInfoSet;
int32_t currIdx; int32_t currIdx;
@ -313,6 +314,7 @@ int32_t streamSnapHandleInit(SStreamSnapHandle* pHandle, char* path, void* pMeta
pHandle->pDbSnapSet = pDbSnapSet; pHandle->pDbSnapSet = pDbSnapSet;
pHandle->pSnapInfoSet = pSnapInfoSet; pHandle->pSnapInfoSet = pSnapInfoSet;
pHandle->currIdx = 0; pHandle->currIdx = 0;
pHandle->pMeta = pMeta;
return 0; return 0;
_err: _err:
@ -331,7 +333,7 @@ void streamSnapHandleDestroy(SStreamSnapHandle* handle) {
} }
taosArrayDestroy(handle->pDbSnapSet); taosArrayDestroy(handle->pDbSnapSet);
} }
streamDestroyTasdDbSnapInfo(handle->handle, handle->pSnapInfoSet); streamDestroyTasdDbSnapInfo(handle->pMeta, handle->pSnapInfoSet);
if (handle->pSnapInfoSet) { if (handle->pSnapInfoSet) {
for (int32_t i = 0; i < taosArrayGetSize(handle->pSnapInfoSet); i++) { for (int32_t i = 0; i < taosArrayGetSize(handle->pSnapInfoSet); i++) {
SStreamTaskSnap* pSnap = taosArrayGet(handle->pSnapInfoSet, i); SStreamTaskSnap* pSnap = taosArrayGet(handle->pSnapInfoSet, i);