Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
82523908
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
82523908
编写于
10月 28, 2021
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact: change struct name
上级
9dbb925a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
111 addition
and
111 deletion
+111
-111
include/server/vnode/tq/tq.h
include/server/vnode/tq/tq.h
+75
-75
source/server/vnode/src/vnodeReadMsg.c
source/server/vnode/src/vnodeReadMsg.c
+2
-2
source/server/vnode/tq/src/tq.c
source/server/vnode/tq/src/tq.c
+34
-34
未找到文件。
include/server/vnode/tq/tq.h
浏览文件 @
82523908
...
...
@@ -22,89 +22,89 @@
extern
"C"
{
#endif
typedef
struct
t
mqMsgHead
{
typedef
struct
T
mqMsgHead
{
int32_t
protoVer
;
int32_t
msgType
;
int64_t
cgId
;
int64_t
clientId
;
}
t
mqMsgHead
;
}
T
mqMsgHead
;
typedef
struct
t
mqOneAck
{
typedef
struct
T
mqOneAck
{
int64_t
topicId
;
int64_t
consumeOffset
;
}
t
mqOneAck
;
}
T
mqOneAck
;
typedef
struct
t
mqAcks
{
typedef
struct
T
mqAcks
{
int32_t
ackNum
;
//should be sorted
t
mqOneAck
acks
[];
}
t
mqAcks
;
T
mqOneAck
acks
[];
}
T
mqAcks
;
//TODO: put msgs into common
typedef
struct
t
mqConnectReq
{
t
mqMsgHead
head
;
t
mqAcks
acks
;
}
t
mqConnectReq
;
typedef
struct
T
mqConnectReq
{
T
mqMsgHead
head
;
T
mqAcks
acks
;
}
T
mqConnectReq
;
typedef
struct
t
mqConnectRsp
{
t
mqMsgHead
head
;
typedef
struct
T
mqConnectRsp
{
T
mqMsgHead
head
;
int8_t
status
;
}
t
mqConnectRsp
;
}
T
mqConnectRsp
;
typedef
struct
t
mqDisconnectReq
{
t
mqMsgHead
head
;
}
tmqDiscon
nectReq
;
typedef
struct
T
mqDisconnectReq
{
T
mqMsgHead
head
;
}
TmqDiscco
nectReq
;
typedef
struct
t
mqDisconnectRsp
{
t
mqMsgHead
head
;
typedef
struct
T
mqDisconnectRsp
{
T
mqMsgHead
head
;
int8_t
status
;
}
tmqDi
connectRsp
;
}
TmqDis
connectRsp
;
typedef
struct
t
mqConsumeReq
{
t
mqMsgHead
head
;
t
mqAcks
acks
;
}
t
mqConsumeReq
;
typedef
struct
T
mqConsumeReq
{
T
mqMsgHead
head
;
T
mqAcks
acks
;
}
T
mqConsumeReq
;
typedef
struct
t
mqMsgContent
{
typedef
struct
T
mqMsgContent
{
int64_t
topicId
;
int64_t
msgLen
;
char
msg
[];
}
t
mqMsgContent
;
}
T
mqMsgContent
;
typedef
struct
t
mqConsumeRsp
{
t
mqMsgHead
head
;
typedef
struct
T
mqConsumeRsp
{
T
mqMsgHead
head
;
int64_t
bodySize
;
t
mqMsgContent
msgs
[];
}
t
mqConsumeRsp
;
T
mqMsgContent
msgs
[];
}
T
mqConsumeRsp
;
typedef
struct
tmqMnode
SubscribeReq
{
t
mqMsgHead
head
;
typedef
struct
Tmq
SubscribeReq
{
T
mqMsgHead
head
;
int64_t
topicLen
;
char
topic
[];
}
t
mqSubscribeReq
;
}
T
mqSubscribeReq
;
typedef
struct
tmq
Mnode
SubscribeRsp
{
t
mqMsgHead
head
;
typedef
struct
tmqSubscribeRsp
{
T
mqMsgHead
head
;
int64_t
vgId
;
char
ep
[];
//TSDB_EP_LEN
}
t
mqSubscribeRsp
;
}
T
mqSubscribeRsp
;
typedef
struct
t
mqHeartbeatReq
{
typedef
struct
T
mqHeartbeatReq
{
}
t
mqHeartbeatReq
;
}
T
mqHeartbeatReq
;
typedef
struct
t
mqHeartbeatRsp
{
typedef
struct
T
mqHeartbeatRsp
{
}
t
mqHeartbeatRsp
;
}
T
mqHeartbeatRsp
;
typedef
struct
t
qTopicVhandle
{
typedef
struct
T
qTopicVhandle
{
//name
//
//executor for filter
//
//callback for mnode
//
}
t
qTopicVhandle
;
}
T
qTopicVhandle
;
typedef
struct
STQ
{
//the collection of group handle
...
...
@@ -114,16 +114,16 @@ typedef struct STQ {
#define TQ_BUFFER_SIZE 8
//TODO: define a serializer and deserializer
typedef
struct
t
qBufferItem
{
typedef
struct
T
qBufferItem
{
int64_t
offset
;
//executors are identical but not concurrent
//so it must be a copy in each item
void
*
executor
;
int64_t
size
;
void
*
content
;
}
t
qBufferItem
;
}
T
qBufferItem
;
typedef
struct
t
qBufferHandle
{
typedef
struct
T
qBufferHandle
{
//char* topic; //c style, end with '\0'
//int64_t cgId;
//void* ahandle;
...
...
@@ -131,32 +131,32 @@ typedef struct tqBufferHandle {
int64_t
topicId
;
int32_t
head
;
int32_t
tail
;
t
qBufferItem
buffer
[
TQ_BUFFER_SIZE
];
}
t
qBufferHandle
;
T
qBufferItem
buffer
[
TQ_BUFFER_SIZE
];
}
T
qBufferHandle
;
typedef
struct
t
qListHandle
{
t
qBufferHandle
bufHandle
;
struct
t
qListHandle
*
next
;
}
t
qListHandle
;
typedef
struct
T
qListHandle
{
T
qBufferHandle
bufHandle
;
struct
T
qListHandle
*
next
;
}
T
qListHandle
;
typedef
struct
t
qGroupHandle
{
typedef
struct
T
qGroupHandle
{
int64_t
cId
;
int64_t
cgId
;
void
*
ahandle
;
int32_t
topicNum
;
t
qListHandle
*
head
;
}
t
qGroupHandle
;
T
qListHandle
*
head
;
}
T
qGroupHandle
;
typedef
struct
t
qQueryExec
{
typedef
struct
T
qQueryExec
{
void
*
src
;
t
qBufferItem
*
dest
;
T
qBufferItem
*
dest
;
void
*
executor
;
}
t
qQueryExec
;
}
T
qQueryExec
;
typedef
struct
t
qQueryMsg
{
t
qQueryExec
*
exec
;
struct
t
qQueryMsg
*
next
;
}
t
qQueryMsg
;
typedef
struct
T
qQueryMsg
{
T
qQueryExec
*
exec
;
struct
T
qQueryMsg
*
next
;
}
T
qQueryMsg
;
//init in each vnode
STQ
*
tqInit
(
void
*
ref_func
(
void
*
),
void
*
unref_func
(
void
*
));
...
...
@@ -166,28 +166,28 @@ void tqCleanUp(STQ*);
int
tqPushMsg
(
STQ
*
,
void
*
msg
,
int64_t
version
);
int
tqCommit
(
STQ
*
);
int
tqConsume
(
STQ
*
,
t
mqConsumeReq
*
);
int
tqConsume
(
STQ
*
,
T
mqConsumeReq
*
);
t
qGroupHandle
*
tqGetGroupHandle
(
STQ
*
,
int64_t
cId
);
T
qGroupHandle
*
tqGetGroupHandle
(
STQ
*
,
int64_t
cId
);
int
tqOpenTCGroup
(
STQ
*
,
int64_t
topicId
,
int64_t
cgId
,
int64_t
cId
);
int
tqCloseTCGroup
(
STQ
*
,
int64_t
topicId
,
int64_t
cgId
,
int64_t
cId
);
int
tqMoveOffsetToNext
(
t
qGroupHandle
*
);
int
tqMoveOffsetToNext
(
T
qGroupHandle
*
);
int
tqResetOffset
(
STQ
*
,
int64_t
topicId
,
int64_t
cgId
,
int64_t
offset
);
int
tqRegisterContext
(
tqGroupHandle
*
,
void
*
);
int
tqLaunchQuery
(
t
qGroupHandle
*
);
int
tqSendLaunchQuery
(
t
qGroupHandle
*
);
int
tqRegisterContext
(
TqGroupHandle
*
,
void
*
ahandle
);
int
tqLaunchQuery
(
T
qGroupHandle
*
);
int
tqSendLaunchQuery
(
T
qGroupHandle
*
);
int
tqSerializeGroupHandle
(
t
qGroupHandle
*
gHandle
,
void
**
ppBytes
);
void
*
tqSerializeListHandle
(
t
qListHandle
*
listHandle
,
void
*
ptr
);
void
*
tqSerializeBufHandle
(
t
qBufferHandle
*
bufHandle
,
void
*
ptr
);
void
*
tqSerializeBufItem
(
t
qBufferItem
*
bufItem
,
void
*
ptr
);
int
tqSerializeGroupHandle
(
T
qGroupHandle
*
gHandle
,
void
**
ppBytes
);
void
*
tqSerializeListHandle
(
T
qListHandle
*
listHandle
,
void
*
ptr
);
void
*
tqSerializeBufHandle
(
T
qBufferHandle
*
bufHandle
,
void
*
ptr
);
void
*
tqSerializeBufItem
(
T
qBufferItem
*
bufItem
,
void
*
ptr
);
const
void
*
tqDeserializeGroupHandle
(
const
void
*
pBytes
,
t
qGroupHandle
*
ghandle
);
const
void
*
tqDeserializeBufHandle
(
const
void
*
pBytes
,
t
qBufferHandle
*
bufHandle
);
const
void
*
tqDeserializeBufItem
(
const
void
*
pBytes
,
t
qBufferItem
*
bufItem
);
const
void
*
tqDeserializeGroupHandle
(
const
void
*
pBytes
,
T
qGroupHandle
*
ghandle
);
const
void
*
tqDeserializeBufHandle
(
const
void
*
pBytes
,
T
qBufferHandle
*
bufHandle
);
const
void
*
tqDeserializeBufItem
(
const
void
*
pBytes
,
T
qBufferItem
*
bufItem
);
int
tqGetGHandleSSize
(
const
t
qGroupHandle
*
gHandle
);
int
tqGetGHandleSSize
(
const
T
qGroupHandle
*
gHandle
);
int
tqBufHandleSSize
();
int
tqBufItemSSize
();
...
...
source/server/vnode/src/vnodeReadMsg.c
浏览文件 @
82523908
...
...
@@ -221,8 +221,8 @@ int32_t vnodeProcessQueryMsg(SVnode *pVnode, SReadMsg *pRead) {
int32_t
vnodeProcessConsumeMsg
(
SVnode
*
pVnode
,
SReadMsg
*
pRead
)
{
//parse message and optionally move offset
void
*
pMsg
=
pRead
->
pCont
;
tmqConsumeReq
*
pConsumeMsg
=
(
t
mqConsumeReq
*
)
pMsg
;
t
mqMsgHead
msgHead
=
pConsumeMsg
->
head
;
TmqConsumeReq
*
pConsumeMsg
=
(
T
mqConsumeReq
*
)
pMsg
;
T
mqMsgHead
msgHead
=
pConsumeMsg
->
head
;
//extract head
STQ
*
pTq
=
pVnode
->
pTQ
;
/*tqBufferHandle *pHandle = tqGetHandle(pTq, msgHead.clientId);*/
...
...
source/server/vnode/tq/src/tq.c
浏览文件 @
82523908
...
...
@@ -22,18 +22,18 @@
//
//handle management message
//
static
int
tqProtoCheck
(
t
mqMsgHead
*
pMsg
)
{
static
int
tqProtoCheck
(
T
mqMsgHead
*
pMsg
)
{
return
pMsg
->
protoVer
==
0
;
}
static
int
tqAckOneTopic
(
tqBufferHandle
*
bhandle
,
tmqOneAck
*
pAck
,
t
qQueryMsg
**
ppQuery
)
{
static
int
tqAckOneTopic
(
TqBufferHandle
*
bhandle
,
TmqOneAck
*
pAck
,
T
qQueryMsg
**
ppQuery
)
{
//clean old item and move forward
int32_t
consumeOffset
=
pAck
->
consumeOffset
;
int
idx
=
consumeOffset
%
TQ_BUFFER_SIZE
;
ASSERT
(
bhandle
->
buffer
[
idx
].
content
&&
bhandle
->
buffer
[
idx
].
executor
);
tfree
(
bhandle
->
buffer
[
idx
].
content
);
if
(
1
/* TODO: need to launch new query */
)
{
tqQueryMsg
*
pNewQuery
=
malloc
(
sizeof
(
t
qQueryMsg
));
TqQueryMsg
*
pNewQuery
=
malloc
(
sizeof
(
T
qQueryMsg
));
if
(
pNewQuery
==
NULL
)
{
//TODO: memory insufficient
return
-
1
;
...
...
@@ -49,14 +49,14 @@ static int tqAckOneTopic(tqBufferHandle *bhandle, tmqOneAck *pAck, tqQueryMsg**
return
0
;
}
static
int
tqAck
(
tqGroupHandle
*
ghandle
,
t
mqAcks
*
pAcks
)
{
static
int
tqAck
(
TqGroupHandle
*
ghandle
,
T
mqAcks
*
pAcks
)
{
int32_t
ackNum
=
pAcks
->
ackNum
;
t
mqOneAck
*
acks
=
pAcks
->
acks
;
T
mqOneAck
*
acks
=
pAcks
->
acks
;
//double ptr for acks and list
int
i
=
0
;
t
qListHandle
*
node
=
ghandle
->
head
;
T
qListHandle
*
node
=
ghandle
->
head
;
int
ackCnt
=
0
;
t
qQueryMsg
*
pQuery
=
NULL
;
T
qQueryMsg
*
pQuery
=
NULL
;
while
(
i
<
ackNum
&&
node
->
next
)
{
if
(
acks
[
i
].
topicId
==
node
->
next
->
bufHandle
.
topicId
)
{
ackCnt
++
;
...
...
@@ -73,12 +73,12 @@ static int tqAck(tqGroupHandle* ghandle, tmqAcks* pAcks) {
return
ackCnt
;
}
static
int
tqCommitTCGroup
(
t
qGroupHandle
*
handle
)
{
static
int
tqCommitTCGroup
(
T
qGroupHandle
*
handle
)
{
//persist modification into disk
return
0
;
}
int
tqCreateTCGroup
(
STQ
*
pTq
,
int64_t
topicId
,
int64_t
cgId
,
int64_t
cId
,
t
qGroupHandle
**
handle
)
{
int
tqCreateTCGroup
(
STQ
*
pTq
,
int64_t
topicId
,
int64_t
cgId
,
int64_t
cId
,
T
qGroupHandle
**
handle
)
{
//create in disk
return
0
;
}
...
...
@@ -99,13 +99,13 @@ int tqDropTCGroup(STQ* pTq, int64_t topicId, int64_t cgId, int64_t cId) {
return
0
;
}
static
int
tqFetch
(
t
qGroupHandle
*
ghandle
,
void
**
msg
)
{
t
qListHandle
*
head
=
ghandle
->
head
;
t
qListHandle
*
node
=
head
;
static
int
tqFetch
(
T
qGroupHandle
*
ghandle
,
void
**
msg
)
{
T
qListHandle
*
head
=
ghandle
->
head
;
T
qListHandle
*
node
=
head
;
int
totSize
=
0
;
//TODO: make it a macro
int
sizeLimit
=
4
*
1024
;
t
mqMsgContent
*
buffer
=
malloc
(
sizeLimit
);
T
mqMsgContent
*
buffer
=
malloc
(
sizeLimit
);
if
(
buffer
==
NULL
)
{
//TODO:memory insufficient
return
-
1
;
...
...
@@ -114,7 +114,7 @@ static int tqFetch(tqGroupHandle* ghandle, void** msg) {
//until all topic iterated or msgs over sizeLimit
while
(
node
->
next
)
{
node
=
node
->
next
;
t
qBufferHandle
*
bufHandle
=
&
node
->
bufHandle
;
T
qBufferHandle
*
bufHandle
=
&
node
->
bufHandle
;
int
idx
=
bufHandle
->
nextConsumeOffset
%
TQ_BUFFER_SIZE
;
if
(
bufHandle
->
buffer
[
idx
].
content
!=
NULL
&&
bufHandle
->
buffer
[
idx
].
offset
==
bufHandle
->
nextConsumeOffset
...
...
@@ -144,19 +144,19 @@ static int tqFetch(tqGroupHandle* ghandle, void** msg) {
}
t
qGroupHandle
*
tqGetGroupHandle
(
STQ
*
pTq
,
int64_t
cId
)
{
T
qGroupHandle
*
tqGetGroupHandle
(
STQ
*
pTq
,
int64_t
cId
)
{
return
NULL
;
}
int
tqLaunchQuery
(
t
qGroupHandle
*
ghandle
)
{
int
tqLaunchQuery
(
T
qGroupHandle
*
ghandle
)
{
return
0
;
}
int
tqSendLaunchQuery
(
t
qGroupHandle
*
gHandle
)
{
int
tqSendLaunchQuery
(
T
qGroupHandle
*
gHandle
)
{
return
0
;
}
/*int tqMoveOffsetToNext(
t
qGroupHandle* ghandle) {*/
/*int tqMoveOffsetToNext(
T
qGroupHandle* ghandle) {*/
/*return 0;*/
/*}*/
...
...
@@ -171,13 +171,13 @@ int tqCommit(STQ* pTq) {
return
0
;
}
int
tqConsume
(
STQ
*
pTq
,
t
mqConsumeReq
*
pMsg
)
{
if
(
!
tqProtoCheck
((
t
mqMsgHead
*
)
pMsg
))
{
int
tqConsume
(
STQ
*
pTq
,
T
mqConsumeReq
*
pMsg
)
{
if
(
!
tqProtoCheck
((
T
mqMsgHead
*
)
pMsg
))
{
//proto version invalid
return
-
1
;
}
int64_t
clientId
=
pMsg
->
head
.
clientId
;
t
qGroupHandle
*
ghandle
=
tqGetGroupHandle
(
pTq
,
clientId
);
T
qGroupHandle
*
ghandle
=
tqGetGroupHandle
(
pTq
,
clientId
);
if
(
ghandle
==
NULL
)
{
//client not connect
return
-
1
;
...
...
@@ -189,7 +189,7 @@ int tqConsume(STQ* pTq, tmqConsumeReq* pMsg) {
}
}
tmqConsumeRsp
*
pRsp
=
(
t
mqConsumeRsp
*
)
pMsg
;
TmqConsumeRsp
*
pRsp
=
(
T
mqConsumeRsp
*
)
pMsg
;
if
(
tqFetch
(
ghandle
,
(
void
**
)
&
pRsp
->
msgs
)
<=
0
)
{
//fetch error
...
...
@@ -204,7 +204,7 @@ int tqConsume(STQ* pTq, tmqConsumeReq* pMsg) {
return
0
;
}
int
tqSerializeGroupHandle
(
t
qGroupHandle
*
gHandle
,
void
**
ppBytes
)
{
int
tqSerializeGroupHandle
(
T
qGroupHandle
*
gHandle
,
void
**
ppBytes
)
{
//calculate size
int
sz
=
tqGetGHandleSSize
(
gHandle
);
void
*
ptr
=
realloc
(
*
ppBytes
,
sz
);
...
...
@@ -227,8 +227,8 @@ int tqSerializeGroupHandle(tqGroupHandle *gHandle, void** ppBytes) {
return
0
;
}
void
*
tqSerializeListHandle
(
t
qListHandle
*
listHandle
,
void
*
ptr
)
{
t
qListHandle
*
node
=
listHandle
;
void
*
tqSerializeListHandle
(
T
qListHandle
*
listHandle
,
void
*
ptr
)
{
T
qListHandle
*
node
=
listHandle
;
ASSERT
(
node
!=
NULL
);
while
(
node
)
{
ptr
=
tqSerializeBufHandle
(
&
node
->
bufHandle
,
ptr
);
...
...
@@ -237,7 +237,7 @@ void* tqSerializeListHandle(tqListHandle *listHandle, void* ptr) {
return
ptr
;
}
void
*
tqSerializeBufHandle
(
t
qBufferHandle
*
bufHandle
,
void
*
ptr
)
{
void
*
tqSerializeBufHandle
(
T
qBufferHandle
*
bufHandle
,
void
*
ptr
)
{
*
(
int64_t
*
)
ptr
=
bufHandle
->
nextConsumeOffset
;
ptr
=
POINTER_SHIFT
(
ptr
,
sizeof
(
int64_t
));
*
(
int64_t
*
)
ptr
=
bufHandle
->
topicId
;
...
...
@@ -252,13 +252,13 @@ void* tqSerializeBufHandle(tqBufferHandle *bufHandle, void* ptr) {
return
ptr
;
}
void
*
tqSerializeBufItem
(
t
qBufferItem
*
bufItem
,
void
*
ptr
)
{
void
*
tqSerializeBufItem
(
T
qBufferItem
*
bufItem
,
void
*
ptr
)
{
//TODO: do we need serialize this?
//mainly for executor
return
ptr
;
}
const
void
*
tqDeserializeGroupHandle
(
const
void
*
pBytes
,
t
qGroupHandle
*
gHandle
)
{
const
void
*
tqDeserializeGroupHandle
(
const
void
*
pBytes
,
T
qGroupHandle
*
gHandle
)
{
const
void
*
ptr
=
pBytes
;
gHandle
->
cId
=
*
(
int64_t
*
)
ptr
;
ptr
=
POINTER_SHIFT
(
ptr
,
sizeof
(
int64_t
));
...
...
@@ -268,10 +268,10 @@ const void* tqDeserializeGroupHandle(const void* pBytes, tqGroupHandle *gHandle)
gHandle
->
topicNum
=
*
(
int32_t
*
)
ptr
;
ptr
=
POINTER_SHIFT
(
ptr
,
sizeof
(
int32_t
));
gHandle
->
head
=
NULL
;
t
qListHandle
*
node
=
gHandle
->
head
;
T
qListHandle
*
node
=
gHandle
->
head
;
for
(
int
i
=
0
;
i
<
gHandle
->
topicNum
;
i
++
)
{
if
(
gHandle
->
head
==
NULL
)
{
if
((
node
=
malloc
(
sizeof
(
t
qListHandle
)))
==
NULL
)
{
if
((
node
=
malloc
(
sizeof
(
T
qListHandle
)))
==
NULL
)
{
//TODO: error
return
NULL
;
}
...
...
@@ -279,7 +279,7 @@ const void* tqDeserializeGroupHandle(const void* pBytes, tqGroupHandle *gHandle)
ptr
=
tqDeserializeBufHandle
(
ptr
,
&
node
->
bufHandle
);
gHandle
->
head
=
node
;
}
else
{
node
->
next
=
malloc
(
sizeof
(
t
qListHandle
));
node
->
next
=
malloc
(
sizeof
(
T
qListHandle
));
if
(
node
->
next
==
NULL
)
{
//TODO: error
return
NULL
;
...
...
@@ -292,7 +292,7 @@ const void* tqDeserializeGroupHandle(const void* pBytes, tqGroupHandle *gHandle)
return
ptr
;
}
const
void
*
tqDeserializeBufHandle
(
const
void
*
pBytes
,
t
qBufferHandle
*
bufHandle
)
{
const
void
*
tqDeserializeBufHandle
(
const
void
*
pBytes
,
T
qBufferHandle
*
bufHandle
)
{
const
void
*
ptr
=
pBytes
;
bufHandle
->
nextConsumeOffset
=
*
(
int64_t
*
)
ptr
;
ptr
=
POINTER_SHIFT
(
ptr
,
sizeof
(
int64_t
));
...
...
@@ -308,12 +308,12 @@ const void* tqDeserializeBufHandle(const void* pBytes, tqBufferHandle *bufHandle
return
ptr
;
}
const
void
*
tqDeserializeBufItem
(
const
void
*
pBytes
,
t
qBufferItem
*
bufItem
)
{
const
void
*
tqDeserializeBufItem
(
const
void
*
pBytes
,
T
qBufferItem
*
bufItem
)
{
return
pBytes
;
}
//TODO: make this a macro
int
tqGetGHandleSSize
(
const
t
qGroupHandle
*
gHandle
)
{
int
tqGetGHandleSSize
(
const
T
qGroupHandle
*
gHandle
)
{
return
sizeof
(
int64_t
)
*
2
+
sizeof
(
int32_t
)
+
gHandle
->
topicNum
*
tqBufHandleSSize
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录