Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4084140f
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4084140f
编写于
10月 10, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
10月 10, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17252 from taosdata/fix/TD-19254-D
fix: coverity scan for sma and tfs
上级
30875cfd
6b984ab4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
8 deletion
+15
-8
source/dnode/vnode/src/sma/smaCommit.c
source/dnode/vnode/src/sma/smaCommit.c
+2
-0
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+2
-1
source/dnode/vnode/src/sma/smaSnapshot.c
source/dnode/vnode/src/sma/smaSnapshot.c
+5
-1
source/libs/tfs/inc/tfsInt.h
source/libs/tfs/inc/tfsInt.h
+1
-1
source/libs/tfs/src/tfs.c
source/libs/tfs/src/tfs.c
+5
-5
未找到文件。
source/dnode/vnode/src/sma/smaCommit.c
浏览文件 @
4084140f
...
...
@@ -161,10 +161,12 @@ static int32_t tdProcessRSmaSyncPreCommitImpl(SSma *pSma) {
* @return int32_t
*/
static
int32_t
tdProcessRSmaSyncCommitImpl
(
SSma
*
pSma
)
{
#if 0
SSmaEnv *pSmaEnv = SMA_RSMA_ENV(pSma);
if (!pSmaEnv) {
return TSDB_CODE_SUCCESS;
}
#endif
return
TSDB_CODE_SUCCESS
;
}
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
4084140f
...
...
@@ -1932,7 +1932,8 @@ int32_t tdRSmaProcessExecImpl(SSma *pSma, ERsmaExecType type) {
int8_t
oldStat
=
atomic_val_compare_exchange_8
(
RSMA_COMMIT_STAT
(
pRSmaStat
),
0
,
2
);
if
(
oldStat
==
0
||
((
oldStat
==
2
)
&&
atomic_load_8
(
RSMA_TRIGGER_STAT
(
pRSmaStat
))
<
TASK_TRIGGER_STAT_PAUSED
))
{
atomic_fetch_add_32
(
&
pRSmaStat
->
nFetchAll
,
1
);
int32_t
oldVal
=
atomic_fetch_add_32
(
&
pRSmaStat
->
nFetchAll
,
1
);
ASSERT
(
oldVal
>=
0
);
tdRSmaFetchAllResult
(
pSma
,
pInfo
);
if
(
0
==
atomic_sub_fetch_32
(
&
pRSmaStat
->
nFetchAll
,
1
))
{
atomic_store_8
(
RSMA_COMMIT_STAT
(
pRSmaStat
),
0
);
...
...
source/dnode/vnode/src/sma/smaSnapshot.c
浏览文件 @
4084140f
...
...
@@ -373,7 +373,11 @@ int32_t rsmaSnapWriterClose(SRSmaSnapWriter** ppWriter, int8_t rollback) {
// TODO: rsma1/rsma2
// qtaskinfo
if
(
pWriter
->
pQTaskFWriter
)
{
taosRemoveFile
(
pWriter
->
pQTaskFWriter
->
fname
);
if
(
taosRemoveFile
(
pWriter
->
pQTaskFWriter
->
fname
)
!=
0
)
{
smaWarn
(
"vgId:%d, vnode snapshot rsma writer failed to remove %s since %s"
,
SMA_VID
(
pWriter
->
pSma
),
pWriter
->
pQTaskFWriter
->
fname
?
pWriter
->
pQTaskFWriter
->
fname
:
"NULL"
,
tstrerror
(
TAOS_SYSTEM_ERROR
(
errno
)));
}
}
}
else
{
// rsma1/rsma2
...
...
source/libs/tfs/inc/tfsInt.h
浏览文件 @
4084140f
...
...
@@ -57,7 +57,7 @@ typedef struct {
typedef
struct
STfsDir
{
SDiskIter
iter
;
SDiskID
did
;
char
dir
n
ame
[
TSDB_FILENAME_LEN
];
char
dir
N
ame
[
TSDB_FILENAME_LEN
];
STfsFile
tfile
;
TdDirPtr
pDir
;
STfs
*
pTfs
;
...
...
source/libs/tfs/src/tfs.c
浏览文件 @
4084140f
...
...
@@ -332,7 +332,7 @@ STfsDir *tfsOpendir(STfs *pTfs, const char *rname) {
SDiskID
diskId
=
{.
id
=
0
,
.
level
=
0
};
pDir
->
iter
.
pDisk
=
TFS_DISK_AT
(
pTfs
,
diskId
);
pDir
->
pTfs
=
pTfs
;
tstrncpy
(
pDir
->
dir
n
ame
,
rname
,
TSDB_FILENAME_LEN
);
tstrncpy
(
pDir
->
dir
N
ame
,
rname
,
TSDB_FILENAME_LEN
);
if
(
tfsOpendirImpl
(
pTfs
,
pDir
)
<
0
)
{
taosMemoryFree
(
pDir
);
...
...
@@ -354,10 +354,10 @@ const STfsFile *tfsReaddir(STfsDir *pTfsDir) {
char
*
name
=
taosGetDirEntryName
(
pDirEntry
);
if
(
strcmp
(
name
,
"."
)
==
0
||
strcmp
(
name
,
".."
)
==
0
)
continue
;
if
(
pTfsDir
->
dir
name
==
NULL
||
pTfsDir
->
dirn
ame
[
0
]
==
0
)
{
if
(
pTfsDir
->
dir
N
ame
[
0
]
==
0
)
{
snprintf
(
bname
,
TMPNAME_LEN
*
2
,
"%s"
,
name
);
}
else
{
snprintf
(
bname
,
TMPNAME_LEN
*
2
,
"%s%s%s"
,
pTfsDir
->
dir
n
ame
,
TD_DIRSEP
,
name
);
snprintf
(
bname
,
TMPNAME_LEN
*
2
,
"%s%s%s"
,
pTfsDir
->
dir
N
ame
,
TD_DIRSEP
,
name
);
}
tfsInitFile
(
pTfsDir
->
pTfs
,
&
pTfsDir
->
tfile
,
pTfsDir
->
did
,
bname
);
...
...
@@ -523,9 +523,9 @@ static int32_t tfsOpendirImpl(STfs *pTfs, STfsDir *pTfsDir) {
pTfsDir
->
did
.
id
=
pDisk
->
id
;
if
(
pDisk
->
path
==
NULL
||
pDisk
->
path
[
0
]
==
0
)
{
snprintf
(
adir
,
TMPNAME_LEN
*
2
,
"%s"
,
pTfsDir
->
dir
n
ame
);
snprintf
(
adir
,
TMPNAME_LEN
*
2
,
"%s"
,
pTfsDir
->
dir
N
ame
);
}
else
{
snprintf
(
adir
,
TMPNAME_LEN
*
2
,
"%s%s%s"
,
pDisk
->
path
,
TD_DIRSEP
,
pTfsDir
->
dir
n
ame
);
snprintf
(
adir
,
TMPNAME_LEN
*
2
,
"%s%s%s"
,
pDisk
->
path
,
TD_DIRSEP
,
pTfsDir
->
dir
N
ame
);
}
pTfsDir
->
pDir
=
taosOpenDir
(
adir
);
if
(
pTfsDir
->
pDir
!=
NULL
)
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录