Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fb2057ae
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
fb2057ae
编写于
4月 26, 2023
作者:
X
Xiaoyu Wang
提交者:
GitHub
4月 26, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21079 from taosdata/FIX/TD-23583-3.0
enh: comment off unused error codes in sync and wal
上级
519dc0ea
23a915da
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
24 deletion
+15
-24
include/util/taoserror.h
include/util/taoserror.h
+10
-10
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+1
-3
source/libs/sync/src/syncPipeline.c
source/libs/sync/src/syncPipeline.c
+1
-1
source/util/src/terror.c
source/util/src/terror.c
+3
-10
未找到文件。
include/util/taoserror.h
浏览文件 @
fb2057ae
...
...
@@ -539,20 +539,20 @@ int32_t* taosGetErrno();
// #define TSDB_CODE_SYN_INVALID_CHECKSUM TAOS_DEF_ERROR_CODE(0, 0x0908) // 2.x
// #define TSDB_CODE_SYN_INVALID_MSGLEN TAOS_DEF_ERROR_CODE(0, 0x0909) // 2.x
// #define TSDB_CODE_SYN_INVALID_MSGTYPE TAOS_DEF_ERROR_CODE(0, 0x090A) // 2.x
#define TSDB_CODE_SYN_IS_LEADER TAOS_DEF_ERROR_CODE(0, 0x090B)
// #define TSDB_CODE_SYN_IS_LEADER TAOS_DEF_ERROR_CODE(0, 0x090B) // unused
#define TSDB_CODE_SYN_NOT_LEADER TAOS_DEF_ERROR_CODE(0, 0x090C)
#define TSDB_CODE_SYN_ONE_REPLICA TAOS_DEF_ERROR_CODE(0, 0x090D)
#define TSDB_CODE_SYN_NOT_IN_NEW_CONFIG TAOS_DEF_ERROR_CODE(0, 0x090E)
#define TSDB_CODE_SYN_NEW_CONFIG_ERROR TAOS_DEF_ERROR_CODE(0, 0x090F)
// internal
#define TSDB_CODE_SYN_RECONFIG_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0910)
// #define TSDB_CODE_SYN_ONE_REPLICA TAOS_DEF_ERROR_CODE(0, 0x090D) // unused
// #define TSDB_CODE_SYN_NOT_IN_NEW_CONFIG TAOS_DEF_ERROR_CODE(0, 0x090E) // unused
#define TSDB_CODE_SYN_NEW_CONFIG_ERROR TAOS_DEF_ERROR_CODE(0, 0x090F) // internal
// #define TSDB_CODE_SYN_RECONFIG_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0910) // unused
#define TSDB_CODE_SYN_PROPOSE_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0911)
#define TSDB_CODE_SYN_STANDBY_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0912)
#define TSDB_CODE_SYN_BATCH_ERROR TAOS_DEF_ERROR_CODE(0, 0x0913)
// #define TSDB_CODE_SYN_STANDBY_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0912) // unused
// #define TSDB_CODE_SYN_BATCH_ERROR TAOS_DEF_ERROR_CODE(0, 0x0913) // unused
#define TSDB_CODE_SYN_RESTORING TAOS_DEF_ERROR_CODE(0, 0x0914)
#define TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG TAOS_DEF_ERROR_CODE(0, 0x0915)
// internal
#define TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG TAOS_DEF_ERROR_CODE(0, 0x0915) // internal
#define TSDB_CODE_SYN_BUFFER_FULL TAOS_DEF_ERROR_CODE(0, 0x0916)
#define TSDB_CODE_SYN_WRITE_STALL TAOS_DEF_ERROR_CODE(0, 0x0917)
#define TSDB_CODE_SYN_NEGO
_WIN_EXCEEDED TAOS_DEF_ERROR_CODE(0, 0X
0918)
#define TSDB_CODE_SYN_NEGO
TIATION_WIN_FULL TAOS_DEF_ERROR_CODE(0, 0x
0918)
#define TSDB_CODE_SYN_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x09FF)
// tq
...
...
@@ -573,7 +573,7 @@ int32_t* taosGetErrno();
// wal
// #define TSDB_CODE_WAL_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x1000) // 2.x
#define TSDB_CODE_WAL_FILE_CORRUPTED TAOS_DEF_ERROR_CODE(0, 0x1001)
#define TSDB_CODE_WAL_SIZE_LIMIT TAOS_DEF_ERROR_CODE(0, 0x1002)
// #define TSDB_CODE_WAL_SIZE_LIMIT TAOS_DEF_ERROR_CODE(0, 0x1002) // unused
#define TSDB_CODE_WAL_INVALID_VER TAOS_DEF_ERROR_CODE(0, 0x1003)
// #define TSDB_CODE_WAL_OUT_OF_MEMORY TAOS_DEF_ERROR_CODE(0, 0x1004) // 2.x
#define TSDB_CODE_WAL_LOG_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x1005)
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
fb2057ae
...
...
@@ -463,8 +463,7 @@ bool syncSnapshotRecving(int64_t rid) {
int32_t
syncNodeLeaderTransfer
(
SSyncNode
*
pSyncNode
)
{
if
(
pSyncNode
->
peersNum
==
0
)
{
sDebug
(
"vgId:%d, only one replica, cannot leader transfer"
,
pSyncNode
->
vgId
);
terrno
=
TSDB_CODE_SYN_ONE_REPLICA
;
return
-
1
;
return
0
;
}
int32_t
ret
=
0
;
...
...
@@ -486,7 +485,6 @@ int32_t syncNodeLeaderTransfer(SSyncNode* pSyncNode) {
int32_t
syncNodeLeaderTransferTo
(
SSyncNode
*
pSyncNode
,
SNodeInfo
newLeader
)
{
if
(
pSyncNode
->
replicaNum
==
1
)
{
sDebug
(
"vgId:%d, only one replica, cannot leader transfer"
,
pSyncNode
->
vgId
);
terrno
=
TSDB_CODE_SYN_ONE_REPLICA
;
return
-
1
;
}
...
...
source/libs/sync/src/syncPipeline.c
浏览文件 @
fb2057ae
...
...
@@ -54,7 +54,7 @@ int32_t syncLogBufferAppend(SSyncLogBuffer* pBuf, SSyncNode* pNode, SSyncRaftEnt
}
if
(
pNode
->
restoreFinish
&&
index
-
pBuf
->
commitIndex
>=
TSDB_SYNC_NEGOTIATION_WIN
)
{
terrno
=
TSDB_CODE_SYN_NEGO
_WIN_EXCEEDED
;
terrno
=
TSDB_CODE_SYN_NEGO
TIATION_WIN_FULL
;
sError
(
"vgId:%d, failed to append since %s, index:%"
PRId64
", commit-index:%"
PRId64
,
pNode
->
vgId
,
terrstr
(),
index
,
pBuf
->
commitIndex
);
goto
_err
;
...
...
source/util/src/terror.c
浏览文件 @
fb2057ae
...
...
@@ -414,20 +414,14 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_TABLE_LIMITED, "Table creation limite
// sync
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_TIMEOUT
,
"Sync timeout"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_IS_LEADER
,
"Sync is leader"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NOT_LEADER
,
"Sync leader is unreachable"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_ONE_REPLICA
,
"Sync one replica"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NOT_IN_NEW_CONFIG
,
"Sync not in new config"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NEW_CONFIG_ERROR
,
"Sync new config error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_RECONFIG_NOT_READY
,
"Sync not ready for reconfig"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_PROPOSE_NOT_READY
,
"Sync not ready for propose"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_STANDBY_NOT_READY
,
"Sync not ready for standby"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_BATCH_ERROR
,
"Sync batch error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_PROPOSE_NOT_READY
,
"Sync not ready to propose"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_RESTORING
,
"Sync leader is restoring"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_INVALID_SNAPSHOT_MSG
,
"Sync invalid snapshot msg"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_BUFFER_FULL
,
"Sync buffer is full"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_WRITE_STALL
,
"Sync write stall"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NEGO
_WIN_EXCEEDED
,
"Sync negotiation win exceeded
"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NEGO
TIATION_WIN_FULL
,
"Sync negotiation win is full
"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_INTERNAL_ERROR
,
"Sync internal error"
)
//tq
...
...
@@ -445,8 +439,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TQ_NO_COMMITTED_OFFSET, "TQ no committed offse
// wal
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_FILE_CORRUPTED
,
"WAL file is corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_SIZE_LIMIT
,
"WAL size exceeds limit"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_INVALID_VER
,
"WAL use invalid version"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_INVALID_VER
,
"WAL invalid version"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_LOG_NOT_EXIST
,
"WAL log not exist"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_CHKSUM_MISMATCH
,
"WAL checksum mismatch"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_LOG_INCOMPLETE
,
"WAL log incomplete"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录