提交 400e1770 编写于 作者: C Cary Xu

compact function verify

上级 4ee01d36
...@@ -662,6 +662,7 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat ...@@ -662,6 +662,7 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
// Recover the data // Recover the data
int ccol = 0; // loop iter for SBlockCol object int ccol = 0; // loop iter for SBlockCol object
int dcol = 0; // loop iter for SDataCols object int dcol = 0; // loop iter for SDataCols object
SBlockCol blockCol = {0};
while (dcol < pDataCols->numOfCols) { while (dcol < pDataCols->numOfCols) {
SDataCol *pDataCol = &(pDataCols->cols[dcol]); SDataCol *pDataCol = &(pDataCols->cols[dcol]);
if (dcol != 0 && ccol >= pBlockData->numOfCols) { if (dcol != 0 && ccol >= pBlockData->numOfCols) {
...@@ -676,10 +677,19 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat ...@@ -676,10 +677,19 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
int32_t tlen = pBlock->keyLen; int32_t tlen = pBlock->keyLen;
if (dcol != 0) { if (dcol != 0) {
SBlockCol *pBlockCol = &(pBlockData->cols[ccol]); if (pBlock->blkVer == SBlockVerLatest) {
tcolId = pBlockCol->colId; SBlockCol *pBlockCol = &(pBlockData->cols[ccol]);
toffset = tsdbGetBlockColOffset(pBlockCol); tcolId = pBlockCol->colId;
tlen = pBlockCol->len; toffset = tsdbGetBlockColOffset(pBlockCol);
tlen = pBlockCol->len;
} else {
SBlockColV0 *pBlockCol = (SBlockColV0 *)(pBlockData->cols) + ccol;
tcolId = pBlockCol->colId;
blockCol.offset = pBlockCol->offset;
blockCol.offsetH = pBlockCol->offsetH;
toffset = tsdbGetBlockColOffset(&blockCol);
tlen = pBlockCol->len;
}
} else { } else {
ASSERT(pDataCol->colId == tcolId); ASSERT(pDataCol->colId == tcolId);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册