add uid to SCompIdx

This commit is contained in:
hzcheng 2020-05-04 21:41:03 +08:00
parent ead1a3101a
commit 9ee563996d
2 changed files with 4 additions and 2 deletions

View File

@ -261,11 +261,12 @@ SFileGroup *tsdbGetFileGroupNext(SFileGroupIter *pIter);
typedef struct {
int32_t len;
int32_t offset;
int32_t padding; // For padding purpose
int32_t hasLast : 1;
int32_t numOfBlocks : 31;
int32_t checksum;
int64_t uid;
TSKEY maxKey;
} SCompIdx; /* sizeof(SCompIdx) = 24 */
} SCompIdx; /* sizeof(SCompIdx) = 28 */
/**
* if numOfSubBlocks == 0, then the SCompBlock is a sub-block

View File

@ -414,6 +414,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) {
ASSERT((pIdx->len - sizeof(SCompInfo) - sizeof(TSCKSUM)) % sizeof(SCompBlock) == 0);
taosCalcChecksumAppend(0, (uint8_t *)pHelper->pCompInfo, pIdx->len);
pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END);
pIdx->uid = pHelper->tableInfo.uid;
if (pIdx->offset < 0) return -1;
ASSERT(pIdx->offset >= tsizeof(pHelper->pCompIdx));