Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b286959a
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看板
未验证
提交
b286959a
编写于
12月 07, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18769 from taosdata/FIX/TD-21043-3.0
enh: check contiguousness of indexes applied to vnode
上级
bd825ff2
50883689
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
10 deletion
+17
-10
include/common/tmsg.h
include/common/tmsg.h
+5
-0
source/dnode/mnode/impl/src/mndSync.c
source/dnode/mnode/impl/src/mndSync.c
+7
-1
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+4
-0
source/libs/sync/inc/syncUtil.h
source/libs/sync/inc/syncUtil.h
+0
-1
source/libs/sync/src/syncPipeline.c
source/libs/sync/src/syncPipeline.c
+1
-6
source/libs/sync/src/syncUtil.c
source/libs/sync/src/syncUtil.c
+0
-2
未找到文件。
include/common/tmsg.h
浏览文件 @
b286959a
...
...
@@ -70,6 +70,11 @@ static inline bool vnodeIsMsgBlock(tmsg_t type) {
return
(
type
==
TDMT_VND_CREATE_TABLE
)
||
(
type
==
TDMT_VND_ALTER_TABLE
)
||
(
type
==
TDMT_VND_DROP_TABLE
)
||
(
type
==
TDMT_VND_UPDATE_TAG_VAL
);
}
static
inline
bool
syncUtilUserCommit
(
tmsg_t
msgType
)
{
return
msgType
!=
TDMT_SYNC_NOOP
&&
msgType
!=
TDMT_SYNC_LEADER_TRANSFER
;
}
/* ------------------------ OTHER DEFINITIONS ------------------------ */
// IE type
#define TSDB_IE_TYPE_SEC 1
...
...
source/dnode/mnode/impl/src/mndSync.c
浏览文件 @
b286959a
...
...
@@ -119,7 +119,13 @@ int32_t mndProcessWriteMsg(const SSyncFSM *pFsm, SRpcMsg *pMsg, const SFsmCbMeta
}
int32_t
mndSyncCommitMsg
(
const
SSyncFSM
*
pFsm
,
SRpcMsg
*
pMsg
,
const
SFsmCbMeta
*
pMeta
)
{
int32_t
code
=
mndProcessWriteMsg
(
pFsm
,
pMsg
,
pMeta
);
int32_t
code
=
0
;
if
(
!
syncUtilUserCommit
(
pMsg
->
msgType
))
{
goto
_out
;
}
code
=
mndProcessWriteMsg
(
pFsm
,
pMsg
,
pMeta
);
_out:
rpcFreeCont
(
pMsg
->
pCont
);
pMsg
->
pCont
=
NULL
;
return
code
;
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
b286959a
...
...
@@ -190,9 +190,13 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
version
);
ASSERT
(
pVnode
->
state
.
applyTerm
<=
pMsg
->
info
.
conn
.
applyTerm
);
ASSERT
(
pVnode
->
state
.
applied
+
1
==
version
);
pVnode
->
state
.
applied
=
version
;
pVnode
->
state
.
applyTerm
=
pMsg
->
info
.
conn
.
applyTerm
;
if
(
!
syncUtilUserCommit
(
pMsg
->
msgType
))
goto
_exit
;
// skip header
pReq
=
POINTER_SHIFT
(
pMsg
->
pCont
,
sizeof
(
SMsgHead
));
len
=
pMsg
->
contLen
-
sizeof
(
SMsgHead
);
...
...
source/libs/sync/inc/syncUtil.h
浏览文件 @
b286959a
...
...
@@ -79,7 +79,6 @@ char* syncUtilPrintBin2(char* ptr, uint32_t len);
void
syncUtilMsgHtoN
(
void
*
msg
);
void
syncUtilMsgNtoH
(
void
*
msg
);
bool
syncUtilUserPreCommit
(
tmsg_t
msgType
);
bool
syncUtilUserCommit
(
tmsg_t
msgType
);
bool
syncUtilUserRollback
(
tmsg_t
msgType
);
void
syncPrintNodeLog
(
const
char
*
flags
,
ELogLevel
level
,
int32_t
dflag
,
SSyncNode
*
pNode
,
const
char
*
format
,
...);
...
...
source/libs/sync/src/syncPipeline.c
浏览文件 @
b286959a
...
...
@@ -513,13 +513,8 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm
if
(
!
syncUtilUserCommit
(
pEntry
->
originalRpcType
))
{
sInfo
(
"vgId:%d, commit sync barrier. index: %"
PRId64
", term:%"
PRId64
", type: %s"
,
vgId
,
pEntry
->
index
,
pEntry
->
term
,
TMSG_INFO
(
pEntry
->
originalRpcType
));
pBuf
->
commitIndex
=
index
;
if
(
!
inBuf
)
{
syncEntryDestroy
(
pEntry
);
pEntry
=
NULL
;
}
continue
;
}
if
(
syncLogFsmExecute
(
pNode
,
pFsm
,
role
,
term
,
pEntry
)
!=
0
)
{
sError
(
"vgId:%d, failed to execute sync log entry. index:%"
PRId64
", term:%"
PRId64
", role: %d, current term: %"
PRId64
,
...
...
source/libs/sync/src/syncUtil.c
浏览文件 @
b286959a
...
...
@@ -160,8 +160,6 @@ void syncUtilMsgNtoH(void* msg) {
bool
syncUtilUserPreCommit
(
tmsg_t
msgType
)
{
return
msgType
!=
TDMT_SYNC_NOOP
&&
msgType
!=
TDMT_SYNC_LEADER_TRANSFER
;
}
bool
syncUtilUserCommit
(
tmsg_t
msgType
)
{
return
msgType
!=
TDMT_SYNC_NOOP
&&
msgType
!=
TDMT_SYNC_LEADER_TRANSFER
;
}
bool
syncUtilUserRollback
(
tmsg_t
msgType
)
{
return
msgType
!=
TDMT_SYNC_NOOP
&&
msgType
!=
TDMT_SYNC_LEADER_TRANSFER
;
}
void
syncCfg2SimpleStr
(
const
SSyncCfg
*
pCfg
,
char
*
buf
,
int32_t
bufLen
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录