definition refactor

This commit is contained in:
Cary Xu 2022-03-28 14:45:19 +08:00
parent 427c938997
commit 8529bf709e
2 changed files with 15 additions and 9 deletions

View File

@ -64,18 +64,20 @@ typedef enum {
#define SBlockVerLatest TSDB_SBLK_VER_0
typedef struct {
uint8_t blkVer : 4;
uint8_t algorithm : 4;
uint8_t last : 1;
uint8_t blkVer : 7;
uint8_t numOfSubBlocks;
int16_t numOfCols; // not including timestamp column
uint8_t numOfSubBlocks : 7;
col_id_t numOfCols; // not including timestamp column
uint32_t len; // data block length
uint32_t keyLen : 24; // key column length, keyOffset = offset+sizeof(SBlockData)+sizeof(SBlockCol)*numOfCols
uint32_t reserve : 8;
int32_t algorithm : 8;
int32_t numOfRows : 24;
uint64_t keyLen : 24; // key column length, keyOffset = offset+sizeof(SBlockData)+sizeof(SBlockCol)*numOfCols
uint64_t colSpan : 8; // columns split span(0~255. 0: no split; other: +1(e.g. 63->64, 127->128, 255->256))
uint64_t schemaVer : 16; // 0~65535
uint64_t numOfRows : 16; // 0~65535
int64_t offset;
uint64_t aggrStat : 1;
uint64_t aggrOffset : 63;
uint64_t reserve; // TODO: use compact mode or reserve for future use?
TSKEY keyFirst;
TSKEY keyLast;
} SBlockV0;

View File

@ -179,12 +179,16 @@ int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
}
} break;
case TDMT_VND_CREATE_SMA: { // timeRangeSMA
#if 0
#if 1
SSmaCfg vCreateSmaReq = {0};
if (tDeserializeSVCreateTSmaReq(POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), &vCreateSmaReq) == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
vWarn("vgId%d: TDMT_VND_CREATE_SMA received but deserialize failed since %s", pVnode->config.vgId, terrstr(terrno));
return -1;
}
vWarn("vgId%d: TDMT_VND_CREATE_SMA received for %s:%" PRIi64, pVnode->config.vgId, vCreateSmaReq.tSma.indexName,
vCreateSmaReq.tSma.indexUid);
// record current timezone of server side
tstrncpy(vCreateSmaReq.tSma.timezone, tsTimezoneStr, TD_TIMEZONE_LEN);