definition refactor
This commit is contained in:
parent
427c938997
commit
8529bf709e
|
@ -64,18 +64,20 @@ typedef enum {
|
||||||
#define SBlockVerLatest TSDB_SBLK_VER_0
|
#define SBlockVerLatest TSDB_SBLK_VER_0
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
uint8_t blkVer : 4;
|
||||||
|
uint8_t algorithm : 4;
|
||||||
uint8_t last : 1;
|
uint8_t last : 1;
|
||||||
uint8_t blkVer : 7;
|
uint8_t numOfSubBlocks : 7;
|
||||||
uint8_t numOfSubBlocks;
|
col_id_t numOfCols; // not including timestamp column
|
||||||
int16_t numOfCols; // not including timestamp column
|
uint32_t len; // data block length
|
||||||
uint32_t len; // data block length
|
uint64_t keyLen : 24; // key column length, keyOffset = offset+sizeof(SBlockData)+sizeof(SBlockCol)*numOfCols
|
||||||
uint32_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))
|
||||||
uint32_t reserve : 8;
|
uint64_t schemaVer : 16; // 0~65535
|
||||||
int32_t algorithm : 8;
|
uint64_t numOfRows : 16; // 0~65535
|
||||||
int32_t numOfRows : 24;
|
|
||||||
int64_t offset;
|
int64_t offset;
|
||||||
uint64_t aggrStat : 1;
|
uint64_t aggrStat : 1;
|
||||||
uint64_t aggrOffset : 63;
|
uint64_t aggrOffset : 63;
|
||||||
|
uint64_t reserve; // TODO: use compact mode or reserve for future use?
|
||||||
TSKEY keyFirst;
|
TSKEY keyFirst;
|
||||||
TSKEY keyLast;
|
TSKEY keyLast;
|
||||||
} SBlockV0;
|
} SBlockV0;
|
||||||
|
|
|
@ -179,12 +179,16 @@ int vnodeApplyWMsg(SVnode *pVnode, SRpcMsg *pMsg, SRpcMsg **pRsp) {
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case TDMT_VND_CREATE_SMA: { // timeRangeSMA
|
case TDMT_VND_CREATE_SMA: { // timeRangeSMA
|
||||||
#if 0
|
#if 1
|
||||||
|
|
||||||
SSmaCfg vCreateSmaReq = {0};
|
SSmaCfg vCreateSmaReq = {0};
|
||||||
if (tDeserializeSVCreateTSmaReq(POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), &vCreateSmaReq) == NULL) {
|
if (tDeserializeSVCreateTSmaReq(POINTER_SHIFT(pMsg->pCont, sizeof(SMsgHead)), &vCreateSmaReq) == NULL) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
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;
|
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
|
// record current timezone of server side
|
||||||
tstrncpy(vCreateSmaReq.tSma.timezone, tsTimezoneStr, TD_TIMEZONE_LEN);
|
tstrncpy(vCreateSmaReq.tSma.timezone, tsTimezoneStr, TD_TIMEZONE_LEN);
|
||||||
|
|
Loading…
Reference in New Issue