feat:add checkpoint
This commit is contained in:
parent
0716a4aee8
commit
ad16487180
|
@ -49,7 +49,7 @@ int32_t tsNumOfMnodeQueryThreads = 4;
|
||||||
int32_t tsNumOfMnodeFetchThreads = 1;
|
int32_t tsNumOfMnodeFetchThreads = 1;
|
||||||
int32_t tsNumOfMnodeReadThreads = 1;
|
int32_t tsNumOfMnodeReadThreads = 1;
|
||||||
int32_t tsNumOfVnodeQueryThreads = 4;
|
int32_t tsNumOfVnodeQueryThreads = 4;
|
||||||
float tsRatioOfVnodeStreamThreads = 1.0;
|
float tsRatioOfVnodeStreamThreads = 2.0;
|
||||||
int32_t tsNumOfVnodeFetchThreads = 4;
|
int32_t tsNumOfVnodeFetchThreads = 4;
|
||||||
int32_t tsNumOfVnodeRsmaThreads = 2;
|
int32_t tsNumOfVnodeRsmaThreads = 2;
|
||||||
int32_t tsNumOfQnodeQueryThreads = 4;
|
int32_t tsNumOfQnodeQueryThreads = 4;
|
||||||
|
|
|
@ -279,9 +279,9 @@ void streamFileStateDecode(SStreamFileState* pFileState, void* pBuff, int32_t le
|
||||||
|
|
||||||
void streamFileStateEncode(SStreamFileState* pFileState, void** pVal, int32_t* pLen) {
|
void streamFileStateEncode(SStreamFileState* pFileState, void** pVal, int32_t* pLen) {
|
||||||
*pLen = sizeof(TSKEY);
|
*pLen = sizeof(TSKEY);
|
||||||
*pVal = taosMemoryCalloc(1, *pLen);
|
(*pVal) = taosMemoryCalloc(1, *pLen);
|
||||||
void** buff = pVal;
|
void* buff = *pVal;
|
||||||
taosEncodeFixedI64(buff, pFileState->flushMark);
|
taosEncodeFixedI64(&buff, pFileState->flushMark);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot, bool flushState) {
|
int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot, bool flushState) {
|
||||||
|
@ -300,6 +300,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
|
||||||
streamFileStateEncode(pFileState, &buff, &len);
|
streamFileStateEncode(pFileState, &buff, &len);
|
||||||
SWinKey key = {.ts = -1, .groupId = 0}; // dengyihao
|
SWinKey key = {.ts = -1, .groupId = 0}; // dengyihao
|
||||||
streamStatePut_rocksdb(pFileState->pFileStore, &key, buff, len);
|
streamStatePut_rocksdb(pFileState->pFileStore, &key, buff, len);
|
||||||
|
taosMemoryFree(buff);
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue