Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6ec088ea
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看板
未验证
提交
6ec088ea
编写于
10月 17, 2022
作者:
H
Hongze Cheng
提交者:
GitHub
10月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17383 from taosdata/fix/hzcheng_coverity_scan
fix: coverity scan problem
上级
4223b43a
ef06a9d2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
10 deletion
+18
-10
source/dnode/vnode/src/meta/metaTable.c
source/dnode/vnode/src/meta/metaTable.c
+6
-1
source/dnode/vnode/src/tsdb/tsdbFS.c
source/dnode/vnode/src/tsdb/tsdbFS.c
+1
-1
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+11
-8
未找到文件。
source/dnode/vnode/src/meta/metaTable.c
浏览文件 @
6ec088ea
...
...
@@ -51,7 +51,7 @@ static int metaUpdateMetaRsp(tb_uid_t uid, char *tbName, SSchemaWrapper *pSchema
return
-
1
;
}
str
cpy
(
pMetaRsp
->
tbName
,
tbName
);
str
ncpy
(
pMetaRsp
->
tbName
,
tbName
,
TSDB_TABLE_NAME_LEN
);
pMetaRsp
->
numOfColumns
=
pSchema
->
nCols
;
pMetaRsp
->
tableType
=
TSDB_NORMAL_TABLE
;
pMetaRsp
->
sversion
=
pSchema
->
version
;
...
...
@@ -817,6 +817,11 @@ static int metaUpdateTableTagVal(SMeta *pMeta, int64_t version, SVAlterTbReq *pA
const
void
*
pData
=
NULL
;
int
nData
=
0
;
if
(
pAlterTbReq
->
tagName
==
NULL
)
{
terrno
=
TSDB_CODE_INVALID_MSG
;
return
-
1
;
}
// search name index
ret
=
tdbTbGet
(
pMeta
->
pNameIdx
,
pAlterTbReq
->
tbName
,
strlen
(
pAlterTbReq
->
tbName
)
+
1
,
&
pVal
,
&
nVal
);
if
(
ret
<
0
)
{
...
...
source/dnode/vnode/src/tsdb/tsdbFS.c
浏览文件 @
6ec088ea
...
...
@@ -819,7 +819,7 @@ int32_t tsdbFSCommit2(STsdb *pTsdb, STsdbFS *pFSNew) {
nRef
=
atomic_sub_fetch_32
(
&
fSet
.
pHeadF
->
nRef
,
1
);
if
(
nRef
==
0
)
{
tsdbHeadFileName
(
pTsdb
,
pSetOld
->
diskId
,
pSetOld
->
fid
,
fSet
.
pHeadF
,
fname
);
taosRemoveFile
(
fname
);
(
void
)
taosRemoveFile
(
fname
);
taosMemoryFree
(
fSet
.
pHeadF
);
}
}
else
{
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
6ec088ea
...
...
@@ -41,7 +41,10 @@ int32_t vnodePreProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg) {
int32_t
nReqs
;
tDecoderInit
(
&
dc
,
(
uint8_t
*
)
pMsg
->
pCont
+
sizeof
(
SMsgHead
),
pMsg
->
contLen
-
sizeof
(
SMsgHead
));
tStartDecode
(
&
dc
);
if
(
tStartDecode
(
&
dc
)
<
0
)
{
code
=
TSDB_CODE_INVALID_MSG
;
return
code
;
}
if
(
tDecodeI32v
(
&
dc
,
&
nReqs
)
<
0
)
{
code
=
TSDB_CODE_INVALID_MSG
;
...
...
@@ -167,9 +170,9 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
int32_t
ret
;
if
(
!
pVnode
->
inUse
)
{
terrno
=
TSDB_CODE_VND_NOT_SYNCED
;
vError
(
"vgId:%d, not ready to write since %s"
,
TD_VID
(
pVnode
),
terrstr
());
return
-
1
;
terrno
=
TSDB_CODE_VND_NOT_SYNCED
;
vError
(
"vgId:%d, not ready to write since %s"
,
TD_VID
(
pVnode
),
terrstr
());
return
-
1
;
}
vDebug
(
"vgId:%d, start to process write request %s, index:%"
PRId64
,
TD_VID
(
pVnode
),
TMSG_INFO
(
pMsg
->
msgType
),
...
...
@@ -293,14 +296,14 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
vInfo
(
"vgId:%d, commit at version %"
PRId64
,
TD_VID
(
pVnode
),
version
);
// commit current change
if
(
vnodeCommit
(
pVnode
)
<
0
)
{
vError
(
"vgId:%d, failed to commit vnode since %s."
,
TD_VID
(
pVnode
),
tstrerror
(
terrno
));
goto
_err
;
vError
(
"vgId:%d, failed to commit vnode since %s."
,
TD_VID
(
pVnode
),
tstrerror
(
terrno
));
goto
_err
;
}
// start a new one
if
(
vnodeBegin
(
pVnode
)
<
0
)
{
vError
(
"vgId:%d, failed to begin vnode since %s."
,
TD_VID
(
pVnode
),
tstrerror
(
terrno
));
goto
_err
;
vError
(
"vgId:%d, failed to begin vnode since %s."
,
TD_VID
(
pVnode
),
tstrerror
(
terrno
));
goto
_err
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录