Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
15454de7
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看板
未验证
提交
15454de7
编写于
12月 06, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 06, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18681 from taosdata/fix/TD-20127
refact: remove redundant error codes
上级
aad8469e
affeec8c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
37 deletion
+25
-37
include/util/taoserror.h
include/util/taoserror.h
+20
-19
source/dnode/mnode/impl/src/mndShow.c
source/dnode/mnode/impl/src/mndShow.c
+2
-2
source/util/src/terror.c
source/util/src/terror.c
+0
-13
source/util/src/tref.c
source/util/src/tref.c
+3
-3
未找到文件。
include/util/taoserror.h
浏览文件 @
15454de7
...
...
@@ -72,7 +72,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_OUT_OF_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0102)
// #define TSDB_CODE_COM_INVALID_CFG_MSG TAOS_DEF_ERROR_CODE(0, 0x0103) // 2.x
#define TSDB_CODE_FILE_CORRUPTED TAOS_DEF_ERROR_CODE(0, 0x0104) //
#define TSDB_CODE_REF_NO_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0105) // internal
// #define TSDB_CODE_REF_NO_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0105) // 2.x
#define TSDB_CODE_REF_FULL TAOS_DEF_ERROR_CODE(0, 0x0106) // internal
#define TSDB_CODE_REF_ID_REMOVED TAOS_DEF_ERROR_CODE(0, 0x0107) // internal
#define TSDB_CODE_REF_INVALID_ID TAOS_DEF_ERROR_CODE(0, 0x0108) // internal
...
...
@@ -163,7 +163,7 @@ int32_t* taosGetErrno();
// #define TSDB_CODE_MND_ACTION_NEED_REPROCESSEDTAOS_DEF_ERROR_CODE(0, 0x0302) // 2.x
#define TSDB_CODE_MND_NO_RIGHTS TAOS_DEF_ERROR_CODE(0, 0x0303)
// #define TSDB_CODE_MND_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x0304) // 2.x
#define TSDB_CODE_MND_INVALID_CONNECTION TAOS_DEF_ERROR_CODE(0, 0x0305)
// #define TSDB_CODE_MND_INVALID_CONNECTION TAOS_DEF_ERROR_CODE(0, 0x0305) // 2.x
// #define TSDB_CODE_MND_INVALID_MSG_VERSION TAOS_DEF_ERROR_CODE(0, 0x0306) // 2.x
// #define TSDB_CODE_MND_INVALID_MSG_LEN TAOS_DEF_ERROR_CODE(0, 0x0307) // 2.x
// #define TSDB_CODE_MND_INVALID_MSG_TYPE TAOS_DEF_ERROR_CODE(0, 0x0308) // 2.x
...
...
@@ -171,27 +171,28 @@ int32_t* taosGetErrno();
// #define TSDB_CODE_MND_OUT_OF_MEMORY TAOS_DEF_ERROR_CODE(0, 0x030A) // 2.x
#define TSDB_CODE_MND_INVALID_SHOWOBJ TAOS_DEF_ERROR_CODE(0, 0x030B)
#define TSDB_CODE_MND_INVALID_QUERY_ID TAOS_DEF_ERROR_CODE(0, 0x030C)
#define TSDB_CODE_MND_INVALID_STREAM_ID TAOS_DEF_ERROR_CODE(0, 0x030D)
// #define TSDB_CODE_MND_INVALID_STREAM_ID TAOS_DEF_ERROR_CODE(0, 0x030D) // 2.x
#define TSDB_CODE_MND_INVALID_CONN_ID TAOS_DEF_ERROR_CODE(0, 0x030E)
#define TSDB_CODE_MND_MNODE_IS_RUNNING TAOS_DEF_ERROR_CODE(0, 0x0310)
#define TSDB_CODE_MND_FAILED_TO_CONFIG_SYNC TAOS_DEF_ERROR_CODE(0, 0x0311)
#define TSDB_CODE_MND_FAILED_TO_START_SYNC TAOS_DEF_ERROR_CODE(0, 0x0312)
#define TSDB_CODE_MND_FAILED_TO_CREATE_DIR TAOS_DEF_ERROR_CODE(0, 0x0313)
#define TSDB_CODE_MND_FAILED_TO_INIT_STEP TAOS_DEF_ERROR_CODE(0, 0x0314)
// #define TSDB_CODE_MND_MNODE_IS_RUNNING TAOS_DEF_ERROR_CODE(0, 0x0310) // 2.x
// #define TSDB_CODE_MND_FAILED_TO_CONFIG_SYNC TAOS_DEF_ERROR_CODE(0, 0x0311) // 2.x
// #define TSDB_CODE_MND_FAILED_TO_START_SYNC TAOS_DEF_ERROR_CODE(0, 0x0312) // 2.x
// #define TSDB_CODE_MND_FAILED_TO_CREATE_DIR TAOS_DEF_ERROR_CODE(0, 0x0313) // 2.x
// #define TSDB_CODE_MND_FAILED_TO_INIT_STEP TAOS_DEF_ERROR_CODE(0, 0x0314) // 2.x
#define TSDB_CODE_MND_USER_DISABLED TAOS_DEF_ERROR_CODE(0, 0x0315)
// mnode-sdb
#define TSDB_CODE_SDB_OBJ_ALREADY_THERE TAOS_DEF_ERROR_CODE(0, 0x0320)
// #define TSDB_CODE_
APP_ERROR
TAOS_DEF_ERROR_CODE(0, 0x0321) // 2.x
#define TSDB_CODE_SDB_INVALID_TABLE_TYPE TAOS_DEF_ERROR_CODE(0, 0x0322)
#define TSDB_CODE_SDB_OBJ_ALREADY_THERE TAOS_DEF_ERROR_CODE(0, 0x0320)
// internal
// #define TSDB_CODE_
MND_SDB_ERROR
TAOS_DEF_ERROR_CODE(0, 0x0321) // 2.x
#define TSDB_CODE_SDB_INVALID_TABLE_TYPE TAOS_DEF_ERROR_CODE(0, 0x0322)
// internal
#define TSDB_CODE_SDB_OBJ_NOT_THERE TAOS_DEF_ERROR_CODE(0, 0x0323)
#define TSDB_CODE_SDB_INVALID_KEY_TYPE TAOS_DEF_ERROR_CODE(0, 0x0325)
#define TSDB_CODE_SDB_INVALID_ACTION_TYPE TAOS_DEF_ERROR_CODE(0, 0x0326)
#define TSDB_CODE_SDB_INVALID_STATUS_TYPE TAOS_DEF_ERROR_CODE(0, 0x0327)
#define TSDB_CODE_SDB_INVALID_DATA_VER TAOS_DEF_ERROR_CODE(0, 0x0328)
#define TSDB_CODE_SDB_INVALID_DATA_LEN TAOS_DEF_ERROR_CODE(0, 0x0329)
// #define TSDB_CODE_MND_SDB_INVAID_META_ROW TAOS_DEF_ERROR_CODE(0, 0x0324) // 2.x
// #define TSDB_CODE_SDB_INVALID_KEY_TYPE TAOS_DEF_ERROR_CODE(0, 0x0325) // 2.x
#define TSDB_CODE_SDB_INVALID_ACTION_TYPE TAOS_DEF_ERROR_CODE(0, 0x0326) // internal
// #define TSDB_CODE_SDB_INVALID_STATUS_TYPE TAOS_DEF_ERROR_CODE(0, 0x0327) // unused
#define TSDB_CODE_SDB_INVALID_DATA_VER TAOS_DEF_ERROR_CODE(0, 0x0328) // internal
#define TSDB_CODE_SDB_INVALID_DATA_LEN TAOS_DEF_ERROR_CODE(0, 0x0329) // internal
#define TSDB_CODE_SDB_INVALID_DATA_CONTENT TAOS_DEF_ERROR_CODE(0, 0x032A)
#define TSDB_CODE_SDB_INVALID_WAl_VER TAOS_DEF_ERROR_CODE(0, 0x032B)
// #define TSDB_CODE_SDB_INVALID_WAl_VER TAOS_DEF_ERROR_CODE(0, 0x032B) // unused
#define TSDB_CODE_SDB_OBJ_CREATING TAOS_DEF_ERROR_CODE(0, 0x032C)
#define TSDB_CODE_SDB_OBJ_DROPPING TAOS_DEF_ERROR_CODE(0, 0x032D)
...
...
@@ -512,7 +513,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_TQ_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0A00)
#define TSDB_CODE_TQ_INIT_FAILED TAOS_DEF_ERROR_CODE(0, 0x0A01)
#define TSDB_CODE_TQ_NO_DISK_PERMISSIONS TAOS_DEF_ERROR_CODE(0, 0x0A03)
#define TSDB_CODE_TQ_FILE_CORRUPTED
TAOS_DEF_ERROR_CODE(0, 0x0A04)
// #define TSDB_CODE_TQ_FILE_CORRUPTED
TAOS_DEF_ERROR_CODE(0, 0x0A04)
// #define TSDB_CODE_TQ_OUT_OF_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0A05)
#define TSDB_CODE_TQ_FILE_ALREADY_EXISTS TAOS_DEF_ERROR_CODE(0, 0x0A06)
#define TSDB_CODE_TQ_FAILED_TO_CREATE_DIR TAOS_DEF_ERROR_CODE(0, 0x0A07)
...
...
@@ -698,7 +699,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_RSMA_INVALID_ENV TAOS_DEF_ERROR_CODE(0, 0x3150)
#define TSDB_CODE_RSMA_INVALID_STAT TAOS_DEF_ERROR_CODE(0, 0x3151)
#define TSDB_CODE_RSMA_QTASKINFO_CREATE TAOS_DEF_ERROR_CODE(0, 0x3152)
#define TSDB_CODE_RSMA_FILE_CORRUPTED
TAOS_DEF_ERROR_CODE(0, 0x3153)
// #define TSDB_CODE_RSMA_FILE_CORRUPTED
TAOS_DEF_ERROR_CODE(0, 0x3153)
#define TSDB_CODE_RSMA_REMOVE_EXISTS TAOS_DEF_ERROR_CODE(0, 0x3154)
#define TSDB_CODE_RSMA_FETCH_MSG_MSSED_UP TAOS_DEF_ERROR_CODE(0, 0x3155)
#define TSDB_CODE_RSMA_EMPTY_INFO TAOS_DEF_ERROR_CODE(0, 0x3156)
...
...
source/dnode/mnode/impl/src/mndShow.c
浏览文件 @
15454de7
...
...
@@ -198,9 +198,9 @@ static int32_t mndProcessRetrieveSysTableReq(SRpcMsg *pReq) {
}
if
(
retrieveReq
.
showId
==
0
)
{
STableMetaRsp
*
pMeta
=
(
STableMetaRsp
*
)
taosHashGet
(
pMnode
->
infosMeta
,
retrieveReq
.
tb
,
strlen
(
retrieveReq
.
tb
));
STableMetaRsp
*
pMeta
=
taosHashGet
(
pMnode
->
infosMeta
,
retrieveReq
.
tb
,
strlen
(
retrieveReq
.
tb
));
if
(
pMeta
==
NULL
)
{
pMeta
=
(
STableMetaRsp
*
)
taosHashGet
(
pMnode
->
perfsMeta
,
retrieveReq
.
tb
,
strlen
(
retrieveReq
.
tb
));
pMeta
=
taosHashGet
(
pMnode
->
perfsMeta
,
retrieveReq
.
tb
,
strlen
(
retrieveReq
.
tb
));
if
(
pMeta
==
NULL
)
{
terrno
=
TSDB_CODE_MND_INVALID_SYS_TABLENAME
;
mError
(
"failed to process show-retrieve req:%p since %s"
,
pShow
,
terrstr
());
...
...
source/util/src/terror.c
浏览文件 @
15454de7
...
...
@@ -57,7 +57,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TIME_UNSYNCED, "Client and server's t
TAOS_DEFINE_ERROR
(
TSDB_CODE_OPS_NOT_SUPPORT
,
"Operation not supported"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_OUT_OF_MEMORY
,
"Out of Memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_FILE_CORRUPTED
,
"Data file corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_REF_NO_MEMORY
,
"Ref out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_REF_FULL
,
"too many Ref Objs"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_REF_ID_REMOVED
,
"Ref ID is removed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_REF_INVALID_ID
,
"Invalid Ref ID"
)
...
...
@@ -140,29 +139,19 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_NOT_STABLE_ERROR, "Table is not a super
// mnode-common
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_NO_RIGHTS
,
"Insufficient privilege for operation"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_CONNECTION
,
"Invalid message connection"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_SHOWOBJ
,
"Data expired"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_QUERY_ID
,
"Invalid query id"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_STREAM_ID
,
"Invalid stream id"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_INVALID_CONN_ID
,
"Invalid connection id"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_MNODE_IS_RUNNING
,
"mnode is alreay running"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_FAILED_TO_CONFIG_SYNC
,
"failed to config sync"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_FAILED_TO_START_SYNC
,
"failed to start sync"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_FAILED_TO_CREATE_DIR
,
"failed to create mnode dir"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_FAILED_TO_INIT_STEP
,
"failed to init components"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_USER_DISABLED
,
"User is disabled"
)
// mnode-sdb
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_OBJ_ALREADY_THERE
,
"Object already there"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_TABLE_TYPE
,
"Invalid table type"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_OBJ_NOT_THERE
,
"Object not there"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_KEY_TYPE
,
"Invalid key type"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_ACTION_TYPE
,
"Invalid action type"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_STATUS_TYPE
,
"Invalid status type"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_DATA_VER
,
"Invalid raw data version"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_DATA_LEN
,
"Invalid raw data len"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_DATA_CONTENT
,
"Invalid raw data content"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_INVALID_WAl_VER
,
"Invalid wal version"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_OBJ_CREATING
,
"Object is creating"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SDB_OBJ_DROPPING
,
"Object is dropping"
)
...
...
@@ -418,7 +407,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_SYN_INTERNAL_ERROR, "Sync internal error")
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_INVALID_CONFIG
,
"TQ invalid config"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_INIT_FAILED
,
"TQ init falied"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_NO_DISK_PERMISSIONS
,
"TQ no disk permissions"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_FILE_CORRUPTED
,
"TQ file corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_FILE_ALREADY_EXISTS
,
"TQ file already exists"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_FAILED_TO_CREATE_DIR
,
"TQ failed to create dir"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_TQ_META_NO_SUCH_KEY
,
"TQ meta no such key"
)
...
...
@@ -596,7 +584,6 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSMA_NO_INDEX_IN_CACHE, "No tsma index in ca
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_INVALID_ENV
,
"Invalid rsma env"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_INVALID_STAT
,
"Invalid rsma state"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_QTASKINFO_CREATE
,
"Rsma qtaskinfo creation error"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_FILE_CORRUPTED
,
"Rsma file corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_REMOVE_EXISTS
,
"Rsma remove exists"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_FETCH_MSG_MSSED_UP
,
"Rsma fetch msg is messed up"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_RSMA_EMPTY_INFO
,
"Rsma info is empty"
)
...
...
source/util/src/tref.c
浏览文件 @
15454de7
...
...
@@ -67,14 +67,14 @@ int32_t taosOpenRef(int32_t max, RefFp fp) {
nodeList
=
taosMemoryCalloc
(
sizeof
(
SRefNode
*
),
(
size_t
)
max
);
if
(
nodeList
==
NULL
)
{
terrno
=
TSDB_CODE_
REF_NO
_MEMORY
;
terrno
=
TSDB_CODE_
OUT_OF
_MEMORY
;
return
-
1
;
}
lockedBy
=
taosMemoryCalloc
(
sizeof
(
int64_t
),
(
size_t
)
max
);
if
(
lockedBy
==
NULL
)
{
taosMemoryFree
(
nodeList
);
terrno
=
TSDB_CODE_
REF_NO
_MEMORY
;
terrno
=
TSDB_CODE_
OUT_OF
_MEMORY
;
return
-
1
;
}
...
...
@@ -164,7 +164,7 @@ int64_t taosAddRef(int32_t rsetId, void *p) {
pNode
=
taosMemoryCalloc
(
sizeof
(
SRefNode
),
1
);
if
(
pNode
==
NULL
)
{
terrno
=
TSDB_CODE_
REF_NO
_MEMORY
;
terrno
=
TSDB_CODE_
OUT_OF
_MEMORY
;
return
-
1
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录