diff --git a/src/tsdb/inc/tsdbMain.h b/src/tsdb/inc/tsdbMain.h index 39808ab02fd23373a14aae8027604cf4f37b026d..22d069141654b129f366c6b5dfc5c1a32373dc46 100644 --- a/src/tsdb/inc/tsdbMain.h +++ b/src/tsdb/inc/tsdbMain.h @@ -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 diff --git a/src/tsdb/src/tsdbRWHelper.c b/src/tsdb/src/tsdbRWHelper.c index 653379e03b1154cf95fab271286996f68fce170d..e32a64629678a4d16a54885ccb9184a09a50a15a 100644 --- a/src/tsdb/src/tsdbRWHelper.c +++ b/src/tsdb/src/tsdbRWHelper.c @@ -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));