Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d9c10a2f
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,发现更多精彩内容 >>
提交
d9c10a2f
编写于
8月 11, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
other: rsma submit
上级
133beb4d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
33 addition
and
31 deletion
+33
-31
include/common/tdatablock.h
include/common/tdatablock.h
+1
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+5
-6
source/dnode/vnode/src/sma/smaRollup.c
source/dnode/vnode/src/sma/smaRollup.c
+27
-24
未找到文件。
include/common/tdatablock.h
浏览文件 @
d9c10a2f
...
...
@@ -246,7 +246,7 @@ void blockDebugShowDataBlocks(const SArray* dataBlocks, const char* flag);
// for debug
char
*
dumpBlockData
(
SSDataBlock
*
pDataBlock
,
const
char
*
flag
,
char
**
dumpBuf
);
int32_t
buildSubmitReqFromDataBlock
(
SSubmitReq
**
pReq
,
const
S
Array
*
pDataBlocks
,
STSchema
*
pTSchema
,
int32_t
vgId
,
int32_t
buildSubmitReqFromDataBlock
(
SSubmitReq
**
pReq
,
const
S
SDataBlock
*
pDataBlocks
,
STSchema
*
pTSchema
,
int32_t
vgId
,
tb_uid_t
suid
);
...
...
source/common/src/tdatablock.c
浏览文件 @
d9c10a2f
...
...
@@ -1875,15 +1875,15 @@ char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf)
* @param suid
*
*/
int32_t
buildSubmitReqFromDataBlock
(
SSubmitReq
**
pReq
,
const
S
Array
*
pDataBlocks
,
STSchema
*
pTSchema
,
int32_t
vgId
,
int32_t
buildSubmitReqFromDataBlock
(
SSubmitReq
**
pReq
,
const
S
SDataBlock
*
pDataBlock
,
STSchema
*
pTSchema
,
int32_t
vgId
,
tb_uid_t
suid
)
{
int32_t
sz
=
taosArrayGetSize
(
pDataBlocks
);
int32_t
bufSize
=
sizeof
(
SSubmitReq
);
int32_t
sz
=
1
;
for
(
int32_t
i
=
0
;
i
<
sz
;
++
i
)
{
SDataBlockInfo
*
pBlkInfo
=
&
((
SSDataBlock
*
)
taosArrayGetP
(
pDataBlocks
,
i
))
->
info
;
const
SDataBlockInfo
*
pBlkInfo
=
&
pDataBlock
->
info
;
int32_t
numOfCols
=
taosArrayGetSize
(
pDataBlocks
);
bufSize
+=
pBlkInfo
->
rows
*
(
TD_ROW_HEAD_LEN
+
pBlkInfo
->
rowSize
+
BitmapLen
(
numOfCols
));
int32_t
colNum
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
bufSize
+=
pBlkInfo
->
rows
*
(
TD_ROW_HEAD_LEN
+
pBlkInfo
->
rowSize
+
BitmapLen
(
colNum
));
bufSize
+=
sizeof
(
SSubmitBlk
);
}
...
...
@@ -1900,7 +1900,6 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks
tdSRowInit
(
&
rb
,
pTSchema
->
version
);
for
(
int32_t
i
=
0
;
i
<
sz
;
++
i
)
{
SSDataBlock
*
pDataBlock
=
taosArrayGetP
(
pDataBlocks
,
i
);
int32_t
colNum
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
int32_t
rows
=
pDataBlock
->
info
.
rows
;
// int32_t rowSize = pDataBlock->info.rowSize;
...
...
source/dnode/vnode/src/sma/smaRollup.c
浏览文件 @
d9c10a2f
...
...
@@ -615,7 +615,7 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm
while
(
1
)
{
uint64_t
ts
;
int32_t
code
=
qExecTaskOpt
(
taskInfo
,
pResList
,
&
ts
);
if
(
code
<
0
)
{
if
(
code
<
0
)
{
if
(
code
==
TSDB_CODE_QRY_IN_EXEC
)
{
break
;
}
else
{
...
...
@@ -627,43 +627,46 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm
if
(
taosArrayGetSize
(
pResList
)
==
0
)
{
if
(
terrno
==
0
)
{
smaDebug
(
"vgId:%d, no rsma %"
PRIi8
" data fetched yet"
,
SMA_VID
(
pSma
),
pItem
->
level
);
//
smaDebug("vgId:%d, no rsma %" PRIi8 " data fetched yet", SMA_VID(pSma), pItem->level);
}
else
{
smaDebug
(
"vgId:%d, no rsma %"
PRIi8
" data fetched since %s"
,
SMA_VID
(
pSma
),
pItem
->
level
,
terrstr
());
goto
_err
;
}
break
;
}
else
{
smaDebug
(
"vgId:%d, rsma %"
PRIi8
" data fetched"
,
SMA_VID
(
pSma
),
pItem
->
level
);
}
#if
0
#if
1
char
flag
[
10
]
=
{
0
};
snprintf
(
flag
,
10
,
"level %"
PRIi8
,
pItem
->
level
);
blockDebugShowDataBlocks
(
pResList
,
flag
);
#endif
STsdb
*
sinkTsdb
=
(
pItem
->
level
==
TSDB_RETENTION_L1
?
pSma
->
pRSmaTsdb
[
0
]
:
pSma
->
pRSmaTsdb
[
1
]);
SSubmitReq
*
pReq
=
NULL
;
// TODO: the schema update should be handled later(TD-17965)
if
(
buildSubmitReqFromDataBlock
(
&
pReq
,
pResList
,
pTSchema
,
SMA_VID
(
pSma
),
suid
)
<
0
)
{
smaError
(
"vgId:%d, build submit req for rsma stable %"
PRIi64
" level %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pResList
);
++
i
)
{
SSDataBlock
*
output
=
taosArrayGetP
(
pResList
,
i
);
STsdb
*
sinkTsdb
=
(
pItem
->
level
==
TSDB_RETENTION_L1
?
pSma
->
pRSmaTsdb
[
0
]
:
pSma
->
pRSmaTsdb
[
1
]);
SSubmitReq
*
pReq
=
NULL
;
// TODO: the schema update should be handled later(TD-17965)
if
(
buildSubmitReqFromDataBlock
(
&
pReq
,
output
,
pTSchema
,
SMA_VID
(
pSma
),
suid
)
<
0
)
{
smaError
(
"vgId:%d, build submit req for rsma stable %"
PRIi64
" level %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
SSDataBlock
*
pBlk
=
(
SSDataBlock
*
)
taosArrayGet
(
pResList
,
0
);
if
(
pReq
&&
tdProcessSubmitReq
(
sinkTsdb
,
pBlk
->
info
.
version
,
pReq
)
<
0
)
{
if
(
pReq
&&
tdProcessSubmitReq
(
sinkTsdb
,
output
->
info
.
version
,
pReq
)
<
0
)
{
taosMemoryFreeClear
(
pReq
);
smaError
(
"vgId:%d, process submit req for rsma stable %"
PRIi64
" level %"
PRIi8
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
taosMemoryFreeClear
(
pReq
);
smaError
(
"vgId:%d, process submit req for rsma stable %"
PRIi64
" level %"
PRIi8
" version %"
PRIi64
" failed since %s"
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
terrstr
());
goto
_err
;
}
smaDebug
(
"vgId:%d, process submit req for rsma table %"
PRIi64
" level %"
PRIi8
" version %"
PRIi64
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
);
smaDebug
(
"vgId:%d, process submit req for rsma table %"
PRIi64
" level %"
PRIi8
" version:%"
PRIi64
,
SMA_VID
(
pSma
),
suid
,
pItem
->
level
,
output
->
info
.
version
);
taosMemoryFreeClear
(
pReq
);
}
}
taosArrayDestroy
(
pResList
);
...
...
@@ -1385,7 +1388,7 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) {
}
_end:
taosTmrReset
(
tdRSmaFetchTrigger
,
pItem
->
maxDelay
,
pItem
,
smaMgmt
.
tmrHandle
,
&
pItem
->
tmrId
);
//
taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId);
tdReleaseSmaRef
(
smaMgmt
.
rsetId
,
pRSmaInfo
->
refId
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录