Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
6874de8e
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
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看板
提交
6874de8e
编写于
11月 05, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-1842
上级
50cdd465
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
15 addition
and
15 deletion
+15
-15
src/dnode/src/dnodeVWrite.c
src/dnode/src/dnodeVWrite.c
+1
-1
src/inc/vnode.h
src/inc/vnode.h
+2
-2
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+1
-1
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+10
-9
src/wal/src/walWrite.c
src/wal/src/walWrite.c
+1
-2
未找到文件。
src/dnode/src/dnodeVWrite.c
浏览文件 @
6874de8e
...
...
@@ -211,7 +211,7 @@ static void *dnodeProcessWriteQueue(void *param) {
dTrace
(
"%p, msg:%p:%s will be processed in vwrite queue, qtype:%d version:%"
PRIu64
,
pWrite
->
rpcAhandle
,
pWrite
,
taosMsg
[
pWrite
->
pHead
->
msgType
],
qtype
,
pWrite
->
pHead
->
version
);
pWrite
->
code
=
vnodeProcessWrite
(
pVnode
,
qtype
,
pWrite
);
pWrite
->
code
=
vnodeProcessWrite
(
pVnode
,
pWrite
->
pHead
,
qtype
,
&
pWrite
->
rspRet
);
if
(
pWrite
->
code
<=
0
)
pWrite
->
processedCount
=
1
;
dTrace
(
"msg:%p is processed in vwrite queue, result:%s"
,
pWrite
,
tstrerror
(
pWrite
->
code
));
...
...
src/inc/vnode.h
浏览文件 @
6874de8e
...
...
@@ -66,8 +66,8 @@ void* vnodeAcquireRqueue(int32_t vgId); // add refCount, get read queue
void
vnodeRelease
(
void
*
pVnode
);
// dec refCount
void
*
vnodeGetWal
(
void
*
pVnode
);
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
pMsg
);
int32_t
vnodeProcessWrite
(
void
*
param
,
int32_t
qtype
,
SVWriteMsg
*
pWrite
);
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
rparam
);
int32_t
vnodeProcessWrite
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
rparam
);
int32_t
vnodeCheckWrite
(
void
*
pVnode
);
int32_t
vnodeGetVnodeList
(
int32_t
vnodeList
[],
int32_t
*
numOfVnodes
);
void
vnodeBuildStatusMsg
(
void
*
param
);
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
6874de8e
...
...
@@ -305,7 +305,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
return
terrno
;
}
walRestore
(
pVnode
->
wal
,
pVnode
,
vnode
WriteToQueu
e
);
walRestore
(
pVnode
->
wal
,
pVnode
,
vnode
ProcessWrit
e
);
if
(
pVnode
->
version
==
0
)
{
pVnode
->
version
=
walGetVersion
(
pVnode
->
wal
);
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
6874de8e
...
...
@@ -46,10 +46,11 @@ void vnodeInitWriteFp(void) {
vnodeProcessWriteMsgFp
[
TSDB_MSG_TYPE_UPDATE_TAG_VAL
]
=
vnodeProcessUpdateTagValMsg
;
}
int32_t
vnodeProcessWrite
(
void
*
param
,
int32_t
qtype
,
SVWriteMsg
*
pWrite
)
{
int32_t
vnodeProcessWrite
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
rparam
)
{
int32_t
code
=
0
;
SVnodeObj
*
pVnode
=
param
;
SWalHead
*
pHead
=
pWrite
->
pHead
;
SVnodeObj
*
pVnode
=
vparam
;
SWalHead
*
pHead
=
wparam
;
SRspRet
*
pRspRet
=
rparam
;
if
(
vnodeProcessWriteMsgFp
[
pHead
->
msgType
]
==
NULL
)
{
vDebug
(
"vgId:%d, msgType:%s not processed, no handle"
,
pVnode
->
vgId
,
taosMsg
[
pHead
->
msgType
]);
...
...
@@ -80,7 +81,7 @@ int32_t vnodeProcessWrite(void *param, int32_t qtype, SVWriteMsg *pWrite) {
// forward to peers, even it is WAL/FWD, it shall be called to update version in sync
int32_t
syncCode
=
0
;
syncCode
=
syncForwardToPeer
(
pVnode
->
sync
,
pHead
,
&
pWrite
->
r
spRet
,
qtype
);
syncCode
=
syncForwardToPeer
(
pVnode
->
sync
,
pHead
,
pR
spRet
,
qtype
);
if
(
syncCode
<
0
)
return
syncCode
;
// write into WAL
...
...
@@ -90,7 +91,7 @@ int32_t vnodeProcessWrite(void *param, int32_t qtype, SVWriteMsg *pWrite) {
pVnode
->
version
=
pHead
->
version
;
// write data locally
code
=
(
*
vnodeProcessWriteMsgFp
[
pHead
->
msgType
])(
pVnode
,
pHead
->
cont
,
&
pWrite
->
r
spRet
);
code
=
(
*
vnodeProcessWriteMsgFp
[
pHead
->
msgType
])(
pVnode
,
pHead
->
cont
,
pR
spRet
);
if
(
code
<
0
)
return
code
;
return
syncCode
;
...
...
@@ -204,7 +205,7 @@ static int32_t vnodeProcessUpdateTagValMsg(SVnodeObj *pVnode, void *pCont, SRspR
return
TSDB_CODE_SUCCESS
;
}
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
pMsg
)
{
int32_t
vnodeWriteToQueue
(
void
*
vparam
,
void
*
wparam
,
int32_t
qtype
,
void
*
rparam
)
{
SVnodeObj
*
pVnode
=
vparam
;
SWalHead
*
pHead
=
wparam
;
...
...
@@ -219,8 +220,8 @@ int32_t vnodeWriteToQueue(void *vparam, void *wparam, int32_t qtype, void *pMsg)
return
TSDB_CODE_VND_OUT_OF_MEMORY
;
}
if
(
pMsg
!=
NULL
)
{
SRpcMsg
*
pRpcMsg
=
pMsg
;
if
(
rparam
!=
NULL
)
{
SRpcMsg
*
pRpcMsg
=
rparam
;
pWrite
->
rpcHandle
=
pRpcMsg
->
handle
;
pWrite
->
rpcAhandle
=
pRpcMsg
->
ahandle
;
}
...
...
src/wal/src/walWrite.c
浏览文件 @
6874de8e
...
...
@@ -305,8 +305,7 @@ static int32_t walRestoreWalFile(SWal *pWal, void *pVnode, FWalWrite writeFp, ch
wTrace
(
"vgId:%d, fileId:%"
PRId64
", restore wal ver:%"
PRIu64
", head ver:%"
PRIu64
" len:%d"
,
pWal
->
vgId
,
fileId
,
pWal
->
version
,
pHead
->
version
,
pHead
->
len
);
if
(
pWal
->
keep
)
pWal
->
version
=
pHead
->
version
;
pWal
->
version
=
pHead
->
version
;
(
*
writeFp
)(
pVnode
,
pHead
,
TAOS_QTYPE_WAL
,
NULL
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录