Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
91823d06
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看板
未验证
提交
91823d06
编写于
1月 06, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
1月 06, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4835 from taosdata/feature/sim
Feature/sim
上级
a229a8e1
65b4b8f0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
6 deletion
+27
-6
src/mnode/src/mnodeSdb.c
src/mnode/src/mnodeSdb.c
+4
-1
src/sync/src/syncRestore.c
src/sync/src/syncRestore.c
+5
-1
src/vnode/inc/vnodeStatus.h
src/vnode/inc/vnodeStatus.h
+1
-0
src/vnode/src/vnodeStatus.c
src/vnode/src/vnodeStatus.c
+12
-0
src/vnode/src/vnodeWrite.c
src/vnode/src/vnodeWrite.c
+5
-4
未找到文件。
src/mnode/src/mnodeSdb.c
浏览文件 @
91823d06
...
...
@@ -1051,7 +1051,10 @@ static int32_t sdbWriteFwdToQueue(int32_t vgId, void *wparam, int32_t qtype, voi
memcpy
(
pRow
->
pHead
,
pHead
,
sizeof
(
SWalHead
)
+
pHead
->
len
);
pRow
->
rowData
=
pRow
->
pHead
->
cont
;
return
sdbWriteToQueue
(
pRow
,
qtype
);
int32_t
code
=
sdbWriteToQueue
(
pRow
,
qtype
);
if
(
code
==
TSDB_CODE_MND_ACTION_IN_PROGRESS
)
code
=
0
;
return
code
;
}
static
int32_t
sdbWriteRowToQueue
(
SSdbRow
*
pInputRow
,
int32_t
action
)
{
...
...
src/sync/src/syncRestore.c
浏览文件 @
91823d06
...
...
@@ -195,7 +195,11 @@ static int32_t syncRestoreWal(SSyncPeer *pPeer, uint64_t *wver) {
}
lastVer
=
pHead
->
version
;
(
*
pNode
->
writeToCache
)(
pNode
->
vgId
,
pHead
,
TAOS_QTYPE_WAL
,
NULL
);
ret
=
(
*
pNode
->
writeToCache
)(
pNode
->
vgId
,
pHead
,
TAOS_QTYPE_WAL
,
NULL
);
if
(
ret
!=
0
)
{
sError
(
"%s, failed to restore record since %s, hver:%"
PRIu64
,
pPeer
->
id
,
tstrerror
(
ret
),
pHead
->
version
);
break
;
}
}
if
(
code
<
0
)
{
...
...
src/vnode/inc/vnodeStatus.h
浏览文件 @
91823d06
...
...
@@ -37,6 +37,7 @@ bool vnodeSetResetStatus(SVnodeObj* pVnode);
bool
vnodeInInitStatus
(
SVnodeObj
*
pVnode
);
bool
vnodeInReadyStatus
(
SVnodeObj
*
pVnode
);
bool
vnodeInReadyOrUpdatingStatus
(
SVnodeObj
*
pVnode
);
bool
vnodeInClosingStatus
(
SVnodeObj
*
pVnode
);
bool
vnodeInResetStatus
(
SVnodeObj
*
pVnode
);
...
...
src/vnode/src/vnodeStatus.c
浏览文件 @
91823d06
...
...
@@ -135,6 +135,18 @@ bool vnodeInReadyStatus(SVnodeObj* pVnode) {
return
in
;
}
bool
vnodeInReadyOrUpdatingStatus
(
SVnodeObj
*
pVnode
)
{
bool
in
=
false
;
pthread_mutex_lock
(
&
pVnode
->
statusMutex
);
if
(
pVnode
->
status
==
TAOS_VN_STATUS_READY
||
pVnode
->
status
==
TAOS_VN_STATUS_UPDATING
)
{
in
=
true
;
}
pthread_mutex_unlock
(
&
pVnode
->
statusMutex
);
return
in
;
}
bool
vnodeInClosingStatus
(
SVnodeObj
*
pVnode
)
{
bool
in
=
false
;
pthread_mutex_lock
(
&
pVnode
->
statusMutex
);
...
...
src/vnode/src/vnodeWrite.c
浏览文件 @
91823d06
...
...
@@ -245,17 +245,18 @@ static int32_t vnodeWriteToWQueueImp(SVWriteMsg *pWrite) {
if
(
pWrite
->
qtype
==
TAOS_QTYPE_RPC
)
{
int32_t
code
=
vnodeCheckWrite
(
pVnode
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
vError
(
"vgId:%d, failed to write into vwqueue since %s"
,
pVnode
->
vgId
,
tstrerror
(
code
));
taosFreeQitem
(
pWrite
);
vnodeRelease
(
pVnode
);
return
code
;
}
}
if
(
!
vnodeInReadyStatus
(
pVnode
))
{
v
Debug
(
"vgId:%d, vnode status is %s, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
]
,
pVnode
->
refCount
,
pVnode
);
if
(
!
vnodeInReady
OrUpdating
Status
(
pVnode
))
{
v
Error
(
"vgId:%d, failed to write into vwqueue, vstatus is %s, refCount:%d pVnode:%p"
,
pVnode
->
vgId
,
vnodeStatus
[
pVnode
->
status
],
pVnode
->
refCount
,
pVnode
);
taosFreeQitem
(
pWrite
);
vnodeRelease
(
pVnode
);
vnodeRelease
(
pVnode
);
return
TSDB_CODE_APP_NOT_READY
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录