Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d268fbf6
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看板
提交
d268fbf6
编写于
4月 16, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Rollup SMA integration
上级
a264bfc6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
22 deletion
+23
-22
include/common/trow.h
include/common/trow.h
+21
-20
source/dnode/mnode/impl/src/mndDb.c
source/dnode/mnode/impl/src/mndDb.c
+1
-0
source/dnode/vnode/src/tsdb/tsdbSma.c
source/dnode/vnode/src/tsdb/tsdbSma.c
+1
-2
未找到文件。
include/common/trow.h
浏览文件 @
d268fbf6
...
...
@@ -162,38 +162,39 @@ typedef struct {
int32_t
extendedRowSize
;
}
SRowBuilder
;
#define TD_ROW_HEAD_LEN (sizeof(STSRow))
#define TD_ROW_HEAD_LEN
(sizeof(STSRow))
#define TD_ROW_NCOLS_LEN (sizeof(col_id_t))
#define TD_ROW_INFO(r) ((r)->info)
#define TD_ROW_TYPE(r) ((r)->type)
#define TD_ROW_DELETE(r) ((r)->del)
#define TD_ROW_ENDIAN(r) ((r)->endian)
#define TD_ROW_SVER(r) ((r)->sver)
#define TD_ROW_NCOLS(r) ((r)->data) // only valid for SKvRow
#define TD_ROW_DATA(r) ((r)->data)
#define TD_ROW_LEN(r) ((r)->len)
#define TD_ROW_KEY(r) ((r)->ts)
#define TD_ROW_INFO(r) ((r)->info)
#define TD_ROW_TYPE(r) ((r)->type)
#define TD_ROW_DELETE(r) ((r)->del)
#define TD_ROW_ENDIAN(r) ((r)->endian)
#define TD_ROW_SVER(r) ((r)->sver)
#define TD_ROW_NCOLS(r) ((r)->data) // only valid for SKvRow
#define TD_ROW_DATA(r) ((r)->data)
#define TD_ROW_LEN(r) ((r)->len)
#define TD_ROW_KEY(r) ((r)->ts)
#define TD_ROW_VER(r) ((r)->ver)
#define TD_ROW_KEY_ADDR(r) (r)
// N.B. If without STSchema, getExtendedRowSize() is used to get the rowMaxBytes and
// (int32_t)ceil((double)nCols/TD_VTYPE_PARTS) should be added if TD_SUPPORT_BITMAP defined.
#define TD_ROW_MAX_BYTES_FROM_SCHEMA(s) (schemaTLen(s) + TD_ROW_HEAD_LEN)
#define TD_ROW_SET_INFO(r, i) (TD_ROW_INFO(r) = (i))
#define TD_ROW_SET_TYPE(r, t) (TD_ROW_TYPE(r) = (t))
#define TD_ROW_SET_DELETE(r) (TD_ROW_DELETE(r) = 1)
#define TD_ROW_SET_SVER(r, v) (TD_ROW_SVER(r) = (v))
#define TD_ROW_SET_LEN(r, l) (TD_ROW_LEN(r) = (l))
#define TD_ROW_SET_INFO(r, i)
(TD_ROW_INFO(r) = (i))
#define TD_ROW_SET_TYPE(r, t)
(TD_ROW_TYPE(r) = (t))
#define TD_ROW_SET_DELETE(r)
(TD_ROW_DELETE(r) = 1)
#define TD_ROW_SET_SVER(r, v)
(TD_ROW_SVER(r) = (v))
#define TD_ROW_SET_LEN(r, l)
(TD_ROW_LEN(r) = (l))
#define TD_ROW_SET_NCOLS(r, n) (*(col_id_t *)TD_ROW_NCOLS(r) = (n))
#define TD_ROW_IS_DELETED(r) (TD_ROW_DELETE(r) == 1)
#define TD_IS_TP_ROW(r) (TD_ROW_TYPE(r) == TD_ROW_TP)
#define TD_IS_KV_ROW(r) (TD_ROW_TYPE(r) == TD_ROW_KV)
#define TD_IS_TP_ROW_T(t) ((t) == TD_ROW_TP)
#define TD_IS_KV_ROW_T(t) ((t) == TD_ROW_KV)
#define TD_IS_TP_ROW(r)
(TD_ROW_TYPE(r) == TD_ROW_TP)
#define TD_IS_KV_ROW(r)
(TD_ROW_TYPE(r) == TD_ROW_KV)
#define TD_IS_TP_ROW_T(t)
((t) == TD_ROW_TP)
#define TD_IS_KV_ROW_T(t)
((t) == TD_ROW_KV)
#define TD_BOOL_STR(b) ((b) ? "true" : "false")
#define TD_BOOL_STR(b)
((b) ? "true" : "false")
#define isUtilizeKVRow(k, d) ((k) < ((d)*KVRatioConvert))
#define TD_ROW_COL_IDX(r) POINTER_SHIFT(TD_ROW_DATA(r), sizeof(col_id_t))
...
...
source/dnode/mnode/impl/src/mndDb.c
浏览文件 @
d268fbf6
...
...
@@ -106,6 +106,7 @@ static SSdbRaw *mndDbActionEncode(SDbObj *pDb) {
SDB_SET_INT8
(
pRaw
,
dataPos
,
pDb
->
cfg
.
cacheLastRow
,
DB_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pDb
->
cfg
.
numOfRetensions
,
DB_ENCODE_OVER
)
for
(
int32_t
i
=
0
;
i
<
pDb
->
cfg
.
numOfRetensions
;
++
i
)
{
TASSERT
(
taosArrayGetSize
(
pDb
->
cfg
.
pRetensions
)
==
pDb
->
cfg
.
numOfRetensions
);
SRetention
*
pRetension
=
taosArrayGet
(
pDb
->
cfg
.
pRetensions
,
i
);
SDB_SET_INT32
(
pRaw
,
dataPos
,
pRetension
->
freq
,
DB_ENCODE_OVER
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pRetension
->
keep
,
DB_ENCODE_OVER
)
...
...
source/dnode/vnode/src/tsdb/tsdbSma.c
浏览文件 @
d268fbf6
...
...
@@ -314,8 +314,7 @@ static FORCE_INLINE void tsdbSmaStatSetDropped(SSmaStatItem *pStatItem) {
}
static
void
tsdbGetSmaDir
(
int32_t
vgId
,
ETsdbSmaType
smaType
,
char
dirName
[])
{
snprintf
(
dirName
,
TSDB_FILENAME_LEN
,
"vnode%svnode%d%stsdb%s%s"
,
TD_DIRSEP
,
vgId
,
TD_DIRSEP
,
TD_DIRSEP
,
TSDB_SMA_DNAME
[
smaType
]);
snprintf
(
dirName
,
TSDB_FILENAME_LEN
,
"vnode%svnode%d%s%s"
,
TD_DIRSEP
,
vgId
,
TD_DIRSEP
,
TSDB_SMA_DNAME
[
smaType
]);
}
static
SSmaEnv
*
tsdbNewSmaEnv
(
const
STsdb
*
pTsdb
,
const
char
*
path
,
SDiskID
did
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录