[td-1373]
This commit is contained in:
parent
ce9dae6768
commit
0e75d3983f
|
@ -106,7 +106,7 @@ typedef struct STSBufFileHeader {
|
||||||
|
|
||||||
STSBuf* tsBufCreate(bool autoDelete, int32_t order);
|
STSBuf* tsBufCreate(bool autoDelete, int32_t order);
|
||||||
STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete);
|
STSBuf* tsBufCreateFromFile(const char* path, bool autoDelete);
|
||||||
STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_t len, int32_t tsOrder);
|
STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_t len, int32_t tsOrder, int32_t vnodeId);
|
||||||
|
|
||||||
void* tsBufDestroy(STSBuf* pTSBuf);
|
void* tsBufDestroy(STSBuf* pTSBuf);
|
||||||
|
|
||||||
|
|
|
@ -6325,7 +6325,7 @@ static int32_t initQInfo(SQueryTableMsg *pQueryMsg, void *tsdb, int32_t vgId, SQ
|
||||||
STSBuf *pTSBuf = NULL;
|
STSBuf *pTSBuf = NULL;
|
||||||
if (pQueryMsg->tsLen > 0) { // open new file to save the result
|
if (pQueryMsg->tsLen > 0) { // open new file to save the result
|
||||||
char *tsBlock = (char *) pQueryMsg + pQueryMsg->tsOffset;
|
char *tsBlock = (char *) pQueryMsg + pQueryMsg->tsOffset;
|
||||||
pTSBuf = tsBufCreateFromCompBlocks(tsBlock, pQueryMsg->tsNumOfBlocks, pQueryMsg->tsLen, pQueryMsg->tsOrder);
|
pTSBuf = tsBufCreateFromCompBlocks(tsBlock, pQueryMsg->tsNumOfBlocks, pQueryMsg->tsLen, pQueryMsg->tsOrder, vgId);
|
||||||
|
|
||||||
tsBufResetPos(pTSBuf);
|
tsBufResetPos(pTSBuf);
|
||||||
bool ret = tsBufNextPos(pTSBuf);
|
bool ret = tsBufNextPos(pTSBuf);
|
||||||
|
|
|
@ -803,14 +803,14 @@ int32_t tsBufMerge(STSBuf* pDestBuf, const STSBuf* pSrcBuf) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_t len, int32_t order) {
|
STSBuf* tsBufCreateFromCompBlocks(const char* pData, int32_t numOfBlocks, int32_t len, int32_t order, int32_t vnodeId) {
|
||||||
STSBuf* pTSBuf = tsBufCreate(true, order);
|
STSBuf* pTSBuf = tsBufCreate(true, order);
|
||||||
|
|
||||||
STSVnodeBlockInfo* pBlockInfo = &(addOneVnodeInfo(pTSBuf, 0)->info);
|
STSVnodeBlockInfo* pBlockInfo = &(addOneVnodeInfo(pTSBuf, 0)->info);
|
||||||
pBlockInfo->numOfBlocks = numOfBlocks;
|
pBlockInfo->numOfBlocks = numOfBlocks;
|
||||||
pBlockInfo->compLen = len;
|
pBlockInfo->compLen = len;
|
||||||
pBlockInfo->offset = getDataStartOffset();
|
pBlockInfo->offset = getDataStartOffset();
|
||||||
pBlockInfo->vnode = 0;
|
pBlockInfo->vnode = vnodeId;
|
||||||
|
|
||||||
// update prev vnode length info in file
|
// update prev vnode length info in file
|
||||||
TSBufUpdateVnodeInfo(pTSBuf, pTSBuf->numOfVnodes - 1, pBlockInfo);
|
TSBufUpdateVnodeInfo(pTSBuf, pTSBuf->numOfVnodes - 1, pBlockInfo);
|
||||||
|
|
Loading…
Reference in New Issue