Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷面1992
TDengine
提交
3cfd246d
TDengine
项目概览
冷面1992
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3cfd246d
编写于
11月 13, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
11月 13, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4205 from taosdata/feature/wal
TD-1982
上级
f001d969
7651b6e4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
13 deletion
+11
-13
src/sync/src/syncMain.c
src/sync/src/syncMain.c
+3
-4
src/vnode/src/vnodeMain.c
src/vnode/src/vnodeMain.c
+2
-3
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+3
-3
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+3
-3
未找到文件。
src/sync/src/syncMain.c
浏览文件 @
3cfd246d
...
...
@@ -352,7 +352,7 @@ void syncConfirmForward(int64_t rid, uint64_t version, int32_t code) {
int32_t
retLen
=
write
(
pPeer
->
peerFd
,
msg
,
msgLen
);
if
(
retLen
==
msgLen
)
{
sDebug
(
"%s, forward-rsp is sent,
ver:%"
PRIu64
,
pPeer
->
id
,
version
);
sDebug
(
"%s, forward-rsp is sent,
code:%x hver:%"
PRIu64
,
pPeer
->
id
,
code
,
version
);
}
else
{
sDebug
(
"%s, failed to send forward ack, restart"
,
pPeer
->
id
);
syncRestartConnection
(
pPeer
);
...
...
@@ -831,7 +831,7 @@ static void syncProcessFwdResponse(char *cont, SSyncPeer *pPeer) {
SSyncFwds
*
pSyncFwds
=
pNode
->
pSyncFwds
;
SFwdInfo
*
pFwdInfo
;
sDebug
(
"%s, forward-rsp is received,
ver:%"
PRIu64
,
pPeer
->
id
,
pFwdRsp
->
version
);
sDebug
(
"%s, forward-rsp is received,
code:%x ver:%"
PRIu64
,
pPeer
->
id
,
pFwdRsp
->
code
,
pFwdRsp
->
version
);
SFwdInfo
*
pFirst
=
pSyncFwds
->
fwdInfo
+
pSyncFwds
->
first
;
if
(
pFirst
->
version
<=
pFwdRsp
->
version
&&
pSyncFwds
->
fwds
>
0
)
{
...
...
@@ -1125,10 +1125,9 @@ static void syncSaveFwdInfo(SSyncNode *pNode, uint64_t version, void *mhandle) {
}
SFwdInfo
*
pFwdInfo
=
pSyncFwds
->
fwdInfo
+
pSyncFwds
->
last
;
memset
(
pFwdInfo
,
0
,
sizeof
(
SFwdInfo
));
pFwdInfo
->
version
=
version
;
pFwdInfo
->
mhandle
=
mhandle
;
pFwdInfo
->
acks
=
0
;
pFwdInfo
->
confirmed
=
0
;
pFwdInfo
->
time
=
time
;
pSyncFwds
->
fwds
++
;
...
...
src/vnode/src/vnodeMain.c
浏览文件 @
3cfd246d
...
...
@@ -637,9 +637,8 @@ static int vnodeResetTsdb(SVnodeObj *pVnode) {
char
rootDir
[
128
]
=
"
\0
"
;
sprintf
(
rootDir
,
"%s/tsdb"
,
pVnode
->
rootDir
);
if
(
atomic_val_compare_exchange_8
(
&
pVnode
->
status
,
TAOS_VN_STATUS_READY
,
TAOS_VN_STATUS_RESET
)
!=
TAOS_VN_STATUS_READY
)
{
return
-
1
;
if
(
pVnode
->
status
!=
TAOS_VN_STATUS_CLOSING
&&
pVnode
->
status
!=
TAOS_VN_STATUS_INIT
)
{
pVnode
->
status
=
TAOS_VN_STATUS_RESET
;
}
void
*
tsdb
=
pVnode
->
tsdb
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
3cfd246d
...
...
@@ -56,19 +56,19 @@ int32_t vnodeProcessRead(void *param, SVReadMsg *pRead) {
static
int32_t
vnodeCheckRead
(
void
*
param
)
{
SVnodeObj
*
pVnode
=
param
;
if
(
pVnode
->
status
!=
TAOS_VN_STATUS_READY
)
{
vDebug
(
"vgId:%d, vnode status is %s, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
vDebug
(
"vgId:%d, vnode status is %s, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
// tsdb may be in reset state
if
(
pVnode
->
tsdb
==
NULL
)
{
vDebug
(
"vgId:%d, tsdb is null, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
vDebug
(
"vgId:%d, tsdb is null, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
if
(
pVnode
->
role
!=
TAOS_SYNC_ROLE_SLAVE
&&
pVnode
->
role
!=
TAOS_SYNC_ROLE_MASTER
)
{
vDebug
(
"vgId:%d, replica:%d role:%s, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
vDebug
(
"vgId:%d, replica:%d role:%s, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
syncCfg
.
replica
,
syncRole
[
pVnode
->
role
],
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
3cfd246d
...
...
@@ -103,18 +103,18 @@ int32_t vnodeProcessWrite(void *vparam, void *wparam, int32_t qtype, void *rpara
static
int32_t
vnodeCheckWrite
(
void
*
param
)
{
SVnodeObj
*
pVnode
=
param
;
if
(
!
(
pVnode
->
accessState
&
TSDB_VN_WRITE_ACCCESS
))
{
vDebug
(
"vgId:%d, no write auth, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
vDebug
(
"vgId:%d, no write auth, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_VND_NO_WRITE_AUTH
;
}
// tsdb may be in reset state
if
(
pVnode
->
tsdb
==
NULL
)
{
vDebug
(
"vgId:%d, tsdb is null, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
vDebug
(
"vgId:%d, tsdb is null, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
if
(
pVnode
->
status
==
TAOS_VN_STATUS_CLOSING
)
{
vDebug
(
"vgId:%d, vnode status is %s, re
c
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
vDebug
(
"vgId:%d, vnode status is %s, re
f
Count:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
pVnode
->
refCount
,
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录