Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
哥们要飞
TDengine
提交
5acc9c28
T
TDengine
项目概览
哥们要飞
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5acc9c28
编写于
10月 17, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
10月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3891 from taosdata/bugfix/td-1709
[TD-1709]<fix>: stream crash in cluster
上级
b4472552
a9e55912
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
1 deletion
+31
-1
src/dnode/CMakeLists.txt
src/dnode/CMakeLists.txt
+1
-0
src/dnode/src/dnodeVWrite.c
src/dnode/src/dnodeVWrite.c
+6
-0
src/vnode/CMakeLists.txt
src/vnode/CMakeLists.txt
+1
-0
src/vnode/inc/vnodeInt.h
src/vnode/inc/vnodeInt.h
+1
-0
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+1
-1
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+21
-0
未找到文件。
src/dnode/CMakeLists.txt
浏览文件 @
5acc9c28
...
...
@@ -4,6 +4,7 @@ PROJECT(TDengine)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/query/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/mnode/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/tsdb/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/sync/inc
)
INCLUDE_DIRECTORIES
(
${
TD_ENTERPRISE_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
inc
)
...
...
src/dnode/src/dnodeVWrite.c
浏览文件 @
5acc9c28
...
...
@@ -24,8 +24,10 @@
#include "twal.h"
#include "tdataformat.h"
#include "tglobal.h"
#include "tsync.h"
#include "vnode.h"
#include "dnodeInt.h"
#include "syncInt.h"
#include "dnodeVWrite.h"
#include "dnodeMgmt.h"
...
...
@@ -239,6 +241,10 @@ static void *dnodeProcessWriteQueue(void *param) {
pHead
->
len
=
pWrite
->
contLen
;
dDebug
(
"%p, rpc msg:%s will be processed in vwrite queue"
,
pWrite
->
rpcMsg
.
ahandle
,
taosMsg
[
pWrite
->
rpcMsg
.
msgType
]);
}
else
if
(
type
==
TAOS_QTYPE_CQ
)
{
pHead
=
(
SWalHead
*
)((
char
*
)
item
+
sizeof
(
SSyncHead
));
dTrace
(
"%p, CQ wal msg:%s will be processed in vwrite queue, version:%"
PRIu64
,
pHead
,
taosMsg
[
pHead
->
msgType
],
pHead
->
version
);
}
else
{
pHead
=
(
SWalHead
*
)
item
;
dTrace
(
"%p, wal msg:%s will be processed in vwrite queue, version:%"
PRIu64
,
pHead
,
taosMsg
[
pHead
->
msgType
],
...
...
src/vnode/CMakeLists.txt
浏览文件 @
5acc9c28
...
...
@@ -4,6 +4,7 @@ PROJECT(TDengine)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/query/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/tsdb/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/dnode/inc
)
INCLUDE_DIRECTORIES
(
${
TD_COMMUNITY_DIR
}
/src/sync/inc
)
INCLUDE_DIRECTORIES
(
${
TD_ENTERPRISE_DIR
}
/src/inc
)
INCLUDE_DIRECTORIES
(
inc
)
AUX_SOURCE_DIRECTORY
(
src SRC
)
...
...
src/vnode/inc/vnodeInt.h
浏览文件 @
5acc9c28
...
...
@@ -62,6 +62,7 @@ typedef struct {
}
SVnodeObj
;
int
vnodeWriteToQueue
(
void
*
param
,
void
*
pHead
,
int
type
);
int
vnodeWriteCqMsgToQueue
(
void
*
param
,
void
*
pHead
,
int
type
);
void
vnodeInitWriteFp
(
void
);
void
vnodeInitReadFp
(
void
);
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
5acc9c28
...
...
@@ -259,7 +259,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
strcpy
(
cqCfg
.
pass
,
tsInternalPass
);
strcpy
(
cqCfg
.
db
,
pVnode
->
db
);
cqCfg
.
vgId
=
vnode
;
cqCfg
.
cqWrite
=
vnodeWriteToQueue
;
cqCfg
.
cqWrite
=
vnodeWrite
CqMsg
ToQueue
;
pVnode
->
cq
=
cqOpen
(
pVnode
,
&
cqCfg
);
if
(
pVnode
->
cq
==
NULL
)
{
vnodeCleanUp
(
pVnode
);
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
5acc9c28
...
...
@@ -22,9 +22,11 @@
#include "tutil.h"
#include "tsdb.h"
#include "twal.h"
#include "tsync.h"
#include "tdataformat.h"
#include "vnode.h"
#include "vnodeInt.h"
#include "syncInt.h"
#include "tcq.h"
static
int32_t
(
*
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SVnodeObj
*
,
void
*
,
SRspRet
*
);
...
...
@@ -189,6 +191,25 @@ static int32_t vnodeProcessUpdateTagValMsg(SVnodeObj *pVnode, void *pCont, SRspR
return
TSDB_CODE_SUCCESS
;
}
int
vnodeWriteCqMsgToQueue
(
void
*
param
,
void
*
data
,
int
type
)
{
SVnodeObj
*
pVnode
=
param
;
SWalHead
*
pHead
=
data
;
int
size
=
sizeof
(
SWalHead
)
+
pHead
->
len
;
SSyncHead
*
pSync
=
(
SSyncHead
*
)
taosAllocateQitem
(
size
+
sizeof
(
SSyncHead
));
SWalHead
*
pWal
=
(
SWalHead
*
)(
pSync
+
1
);
memcpy
(
pWal
,
pHead
,
size
);
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
vDebug
(
"CQ: vgId:%d, get vnode wqueue, refCount:%d"
,
pVnode
->
vgId
,
pVnode
->
refCount
);
taosWriteQitem
(
pVnode
->
wqueue
,
type
,
pSync
);
return
0
;
}
int
vnodeWriteToQueue
(
void
*
param
,
void
*
data
,
int
type
)
{
SVnodeObj
*
pVnode
=
param
;
SWalHead
*
pHead
=
data
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录