enh:[TD-30270]opti data struct in tmq
This commit is contained in:
parent
f1d900bf75
commit
a1fbf769a8
|
@ -649,20 +649,6 @@ void tFreeSSubmitRsp(SSubmitRsp* pRsp);
|
||||||
(s)->flags &= (~COL_IDX_ON); \
|
(s)->flags &= (~COL_IDX_ON); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
enum {
|
|
||||||
RES_TYPE__QUERY = 1,
|
|
||||||
RES_TYPE__TMQ,
|
|
||||||
RES_TYPE__TMQ_META,
|
|
||||||
RES_TYPE__TMQ_METADATA,
|
|
||||||
RES_TYPE__TMQ_BATCH_META,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TD_RES_QUERY(res) (*(int8_t*)(res) == RES_TYPE__QUERY)
|
|
||||||
#define TD_RES_TMQ(res) (*(int8_t*)(res) == RES_TYPE__TMQ)
|
|
||||||
#define TD_RES_TMQ_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_META)
|
|
||||||
#define TD_RES_TMQ_METADATA(res) (*(int8_t*)(res) == RES_TYPE__TMQ_METADATA)
|
|
||||||
#define TD_RES_TMQ_BATCH_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_BATCH_META)
|
|
||||||
|
|
||||||
#define SSCHMEA_TYPE(s) ((s)->type)
|
#define SSCHMEA_TYPE(s) ((s)->type)
|
||||||
#define SSCHMEA_FLAGS(s) ((s)->flags)
|
#define SSCHMEA_FLAGS(s) ((s)->flags)
|
||||||
#define SSCHMEA_COLID(s) ((s)->colId)
|
#define SSCHMEA_COLID(s) ((s)->colId)
|
||||||
|
@ -4056,19 +4042,6 @@ void tDeleteMqMetaRsp(SMqMetaRsp* pRsp);
|
||||||
|
|
||||||
#define MQ_DATA_RSP_VERSION 100
|
#define MQ_DATA_RSP_VERSION 100
|
||||||
|
|
||||||
//typedef struct {
|
|
||||||
// SMqRspHead head;
|
|
||||||
// STqOffsetVal rspOffset;
|
|
||||||
// STqOffsetVal reqOffset;
|
|
||||||
// int32_t blockNum;
|
|
||||||
// int8_t withTbName;
|
|
||||||
// int8_t withSchema;
|
|
||||||
// SArray* blockDataLen;
|
|
||||||
// SArray* blockData;
|
|
||||||
// SArray* blockTbName;
|
|
||||||
// SArray* blockSchema;
|
|
||||||
//} SMqDataRspCommon;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct {
|
struct {
|
||||||
SMqRspHead head;
|
SMqRspHead head;
|
||||||
|
|
|
@ -39,24 +39,24 @@ extern "C" {
|
||||||
#define ERROR_MSG_BUF_DEFAULT_SIZE 512
|
#define ERROR_MSG_BUF_DEFAULT_SIZE 512
|
||||||
#define HEARTBEAT_INTERVAL 1500 // ms
|
#define HEARTBEAT_INTERVAL 1500 // ms
|
||||||
|
|
||||||
//enum {
|
enum {
|
||||||
// RES_TYPE__QUERY = 1,
|
RES_TYPE__QUERY = 1,
|
||||||
// RES_TYPE__TMQ,
|
RES_TYPE__TMQ,
|
||||||
// RES_TYPE__TMQ_META,
|
RES_TYPE__TMQ_META,
|
||||||
// RES_TYPE__TMQ_METADATA,
|
RES_TYPE__TMQ_METADATA,
|
||||||
// RES_TYPE__TMQ_BATCH_META,
|
RES_TYPE__TMQ_BATCH_META,
|
||||||
//};
|
};
|
||||||
|
|
||||||
#define SHOW_VARIABLES_RESULT_COLS 3
|
#define SHOW_VARIABLES_RESULT_COLS 3
|
||||||
#define SHOW_VARIABLES_RESULT_FIELD1_LEN (TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE)
|
#define SHOW_VARIABLES_RESULT_FIELD1_LEN (TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE)
|
||||||
#define SHOW_VARIABLES_RESULT_FIELD2_LEN (TSDB_CONFIG_VALUE_LEN + VARSTR_HEADER_SIZE)
|
#define SHOW_VARIABLES_RESULT_FIELD2_LEN (TSDB_CONFIG_VALUE_LEN + VARSTR_HEADER_SIZE)
|
||||||
#define SHOW_VARIABLES_RESULT_FIELD3_LEN (TSDB_CONFIG_SCOPE_LEN + VARSTR_HEADER_SIZE)
|
#define SHOW_VARIABLES_RESULT_FIELD3_LEN (TSDB_CONFIG_SCOPE_LEN + VARSTR_HEADER_SIZE)
|
||||||
|
|
||||||
//#define TD_RES_QUERY(res) (*(int8_t*)(res) == RES_TYPE__QUERY)
|
#define TD_RES_QUERY(res) (*(int8_t*)(res) == RES_TYPE__QUERY)
|
||||||
//#define TD_RES_TMQ(res) (*(int8_t*)(res) == RES_TYPE__TMQ)
|
#define TD_RES_TMQ(res) (*(int8_t*)(res) == RES_TYPE__TMQ)
|
||||||
//#define TD_RES_TMQ_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_META)
|
#define TD_RES_TMQ_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_META)
|
||||||
//#define TD_RES_TMQ_METADATA(res) (*(int8_t*)(res) == RES_TYPE__TMQ_METADATA)
|
#define TD_RES_TMQ_METADATA(res) (*(int8_t*)(res) == RES_TYPE__TMQ_METADATA)
|
||||||
//#define TD_RES_TMQ_BATCH_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_BATCH_META)
|
#define TD_RES_TMQ_BATCH_META(res) (*(int8_t*)(res) == RES_TYPE__TMQ_BATCH_META)
|
||||||
|
|
||||||
typedef struct SAppInstInfo SAppInstInfo;
|
typedef struct SAppInstInfo SAppInstInfo;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue