提交 9ee56399 编写于 作者: H hzcheng

add uid to SCompIdx

上级 ead1a310
...@@ -261,11 +261,12 @@ SFileGroup *tsdbGetFileGroupNext(SFileGroupIter *pIter); ...@@ -261,11 +261,12 @@ SFileGroup *tsdbGetFileGroupNext(SFileGroupIter *pIter);
typedef struct { typedef struct {
int32_t len; int32_t len;
int32_t offset; int32_t offset;
int32_t padding; // For padding purpose
int32_t hasLast : 1; int32_t hasLast : 1;
int32_t numOfBlocks : 31; int32_t numOfBlocks : 31;
int32_t checksum; int64_t uid;
TSKEY maxKey; TSKEY maxKey;
} SCompIdx; /* sizeof(SCompIdx) = 24 */ } SCompIdx; /* sizeof(SCompIdx) = 28 */
/** /**
* if numOfSubBlocks == 0, then the SCompBlock is a sub-block * if numOfSubBlocks == 0, then the SCompBlock is a sub-block
......
...@@ -414,6 +414,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) { ...@@ -414,6 +414,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) {
ASSERT((pIdx->len - sizeof(SCompInfo) - sizeof(TSCKSUM)) % sizeof(SCompBlock) == 0); ASSERT((pIdx->len - sizeof(SCompInfo) - sizeof(TSCKSUM)) % sizeof(SCompBlock) == 0);
taosCalcChecksumAppend(0, (uint8_t *)pHelper->pCompInfo, pIdx->len); taosCalcChecksumAppend(0, (uint8_t *)pHelper->pCompInfo, pIdx->len);
pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END); pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END);
pIdx->uid = pHelper->tableInfo.uid;
if (pIdx->offset < 0) return -1; if (pIdx->offset < 0) return -1;
ASSERT(pIdx->offset >= tsizeof(pHelper->pCompIdx)); ASSERT(pIdx->offset >= tsizeof(pHelper->pCompIdx));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册