Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
71f4226e
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
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,发现更多精彩内容 >>
提交
71f4226e
编写于
6月 27, 2023
作者:
L
liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix coverity san issues
上级
c8cc0d2f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
5 deletion
+6
-5
source/dnode/vnode/src/tq/tqSink.c
source/dnode/vnode/src/tq/tqSink.c
+2
-0
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+0
-1
source/libs/stream/src/tstreamFileState.c
source/libs/stream/src/tstreamFileState.c
+4
-4
未找到文件。
source/dnode/vnode/src/tq/tqSink.c
浏览文件 @
71f4226e
...
@@ -337,6 +337,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
...
@@ -337,6 +337,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
tagArray
=
taosArrayInit
(
1
,
sizeof
(
STagVal
));
tagArray
=
taosArrayInit
(
1
,
sizeof
(
STagVal
));
if
(
!
tagArray
)
{
if
(
!
tagArray
)
{
tdDestroySVCreateTbReq
(
pCreateTbReq
);
tdDestroySVCreateTbReq
(
pCreateTbReq
);
taosMemoryFreeClear
(
pCreateTbReq
);
goto
_end
;
goto
_end
;
}
}
STagVal
tagVal
=
{
STagVal
tagVal
=
{
...
@@ -352,6 +353,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
...
@@ -352,6 +353,7 @@ void tqSinkToTablePipeline(SStreamTask* pTask, void* vnode, int64_t ver, void* d
tagArray
=
taosArrayDestroy
(
tagArray
);
tagArray
=
taosArrayDestroy
(
tagArray
);
if
(
pTag
==
NULL
)
{
if
(
pTag
==
NULL
)
{
tdDestroySVCreateTbReq
(
pCreateTbReq
);
tdDestroySVCreateTbReq
(
pCreateTbReq
);
taosMemoryFreeClear
(
pCreateTbReq
);
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
goto
_end
;
goto
_end
;
}
}
...
...
source/libs/stream/src/stream.c
浏览文件 @
71f4226e
...
@@ -74,7 +74,6 @@ void streamSchedByTimer(void* param, void* tmrId) {
...
@@ -74,7 +74,6 @@ void streamSchedByTimer(void* param, void* tmrId) {
atomic_store_8
(
&
pTask
->
triggerStatus
,
TASK_TRIGGER_STATUS__INACTIVE
);
atomic_store_8
(
&
pTask
->
triggerStatus
,
TASK_TRIGGER_STATUS__INACTIVE
);
if
(
tAppendDataToInputQueue
(
pTask
,
(
SStreamQueueItem
*
)
trigger
)
<
0
)
{
if
(
tAppendDataToInputQueue
(
pTask
,
(
SStreamQueueItem
*
)
trigger
)
<
0
)
{
taosFreeQitem
(
trigger
);
taosTmrReset
(
streamSchedByTimer
,
(
int32_t
)
pTask
->
triggerParam
,
pTask
,
streamEnv
.
timer
,
&
pTask
->
timer
);
taosTmrReset
(
streamSchedByTimer
,
(
int32_t
)
pTask
->
triggerParam
,
pTask
,
streamEnv
.
timer
,
&
pTask
->
timer
);
return
;
return
;
}
}
...
...
source/libs/stream/src/tstreamFileState.c
浏览文件 @
71f4226e
...
@@ -355,7 +355,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
...
@@ -355,7 +355,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
SRowBuffPos
*
pPos
=
*
(
SRowBuffPos
**
)
pNode
->
data
;
SRowBuffPos
*
pPos
=
*
(
SRowBuffPos
**
)
pNode
->
data
;
ASSERT
(
pPos
->
pRowBuff
&&
pFileState
->
rowSize
>
0
);
ASSERT
(
pPos
->
pRowBuff
&&
pFileState
->
rowSize
>
0
);
if
(
streamStateGetBatchSize
(
batch
)
>=
BATCH_LIMIT
)
{
if
(
streamStateGetBatchSize
(
batch
)
>=
BATCH_LIMIT
)
{
code
=
streamStatePutBatch_rocksdb
(
pFileState
->
pFileStore
,
batch
);
streamStatePutBatch_rocksdb
(
pFileState
->
pFileStore
,
batch
);
streamStateClearBatch
(
batch
);
streamStateClearBatch
(
batch
);
}
}
...
@@ -364,7 +364,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
...
@@ -364,7 +364,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
qDebug
(
"===stream===put %"
PRId64
" to disc, res %d"
,
sKey
.
key
.
ts
,
code
);
qDebug
(
"===stream===put %"
PRId64
" to disc, res %d"
,
sKey
.
key
.
ts
,
code
);
}
}
if
(
streamStateGetBatchSize
(
batch
)
>
0
)
{
if
(
streamStateGetBatchSize
(
batch
)
>
0
)
{
code
=
streamStatePutBatch_rocksdb
(
pFileState
->
pFileStore
,
batch
);
streamStatePutBatch_rocksdb
(
pFileState
->
pFileStore
,
batch
);
}
}
streamStateClearBatch
(
batch
);
streamStateClearBatch
(
batch
);
...
@@ -376,7 +376,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
...
@@ -376,7 +376,7 @@ int32_t flushSnapshot(SStreamFileState* pFileState, SStreamSnapshot* pSnapshot,
int32_t
len
=
0
;
int32_t
len
=
0
;
sprintf
(
keyBuf
,
"%s:%"
PRId64
""
,
taskKey
,
((
SStreamState
*
)
pFileState
->
pFileStore
)
->
checkPointId
);
sprintf
(
keyBuf
,
"%s:%"
PRId64
""
,
taskKey
,
((
SStreamState
*
)
pFileState
->
pFileStore
)
->
checkPointId
);
streamFileStateEncode
(
&
pFileState
->
flushMark
,
&
valBuf
,
&
len
);
streamFileStateEncode
(
&
pFileState
->
flushMark
,
&
valBuf
,
&
len
);
code
=
streamStatePutBatch
(
pFileState
->
pFileStore
,
"default"
,
batch
,
keyBuf
,
valBuf
,
len
,
0
);
streamStatePutBatch
(
pFileState
->
pFileStore
,
"default"
,
batch
,
keyBuf
,
valBuf
,
len
,
0
);
taosMemoryFree
(
valBuf
);
taosMemoryFree
(
valBuf
);
}
}
{
{
...
@@ -480,7 +480,7 @@ int32_t recoverSnapshot(SStreamFileState* pFileState) {
...
@@ -480,7 +480,7 @@ int32_t recoverSnapshot(SStreamFileState* pFileState) {
break
;
break
;
}
}
memcpy
(
pNewPos
->
pRowBuff
,
pVal
,
pVLen
);
memcpy
(
pNewPos
->
pRowBuff
,
pVal
,
pVLen
);
code
=
tSimpleHashPut
(
pFileState
->
rowBuffMap
,
pNewPos
->
pKey
,
pFileState
->
rowSize
,
&
pNewPos
,
POINTER_BYTES
);
code
=
tSimpleHashPut
(
pFileState
->
rowBuffMap
,
pNewPos
->
pKey
,
pFileState
->
keyLen
,
&
pNewPos
,
POINTER_BYTES
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
destroyRowBuffPos
(
pNewPos
);
destroyRowBuffPos
(
pNewPos
);
break
;
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录