Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
882f4f38
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看板
未验证
提交
882f4f38
编写于
5月 30, 2022
作者:
H
Hongze Cheng
提交者:
GitHub
5月 30, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13212 from taosdata/fix/hzcheng_3.0
fix: meta latest version
上级
82881d1c
2eee0c99
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
10 deletion
+10
-10
source/dnode/vnode/src/inc/tsdb.h
source/dnode/vnode/src/inc/tsdb.h
+1
-2
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+1
-0
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+8
-8
未找到文件。
source/dnode/vnode/src/inc/tsdb.h
浏览文件 @
882f4f38
...
...
@@ -85,7 +85,7 @@ struct STable {
#define TABLE_TID(t) (t)->tid
#define TABLE_UID(t) (t)->uid
int
tsdbPrepareCommit
(
STsdb
*
pTsdb
);
int
tsdbPrepareCommit
(
STsdb
*
pTsdb
);
typedef
enum
{
TSDB_FILE_HEAD
=
0
,
// .head
TSDB_FILE_DATA
,
// .data
...
...
@@ -181,7 +181,6 @@ int tsdbUnlockRepo(STsdb *pTsdb);
static
FORCE_INLINE
STSchema
*
tsdbGetTableSchemaImpl
(
STsdb
*
pTsdb
,
STable
*
pTable
,
bool
lock
,
bool
copy
,
int32_t
version
)
{
if
((
version
!=
-
1
)
&&
(
schemaVersion
(
pTable
->
pSchema
)
!=
version
))
{
taosMemoryFreeClear
(
pTable
->
pSchema
);
pTable
->
pSchema
=
metaGetTbTSchema
(
REPO_META
(
pTsdb
),
pTable
->
uid
,
version
);
...
...
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
882f4f38
...
...
@@ -178,6 +178,7 @@ SSchemaWrapper *metaGetTableSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver, boo
if
(
me
.
type
==
TSDB_SUPER_TABLE
)
{
pSchema
=
tCloneSSchemaWrapper
(
&
me
.
stbEntry
.
schemaRow
);
}
else
if
(
me
.
type
==
TSDB_NORMAL_TABLE
)
{
pSchema
=
tCloneSSchemaWrapper
(
&
me
.
ntbEntry
.
schemaRow
);
}
else
{
ASSERT
(
0
);
}
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
882f4f38
...
...
@@ -84,8 +84,8 @@ static int tsdbMergeBlockData(SCommitH *pCommith, SCommitIter *pIter, SDataCols
static
void
tsdbResetCommitTable
(
SCommitH
*
pCommith
);
static
void
tsdbCloseCommitFile
(
SCommitH
*
pCommith
,
bool
hasError
);
static
bool
tsdbCanAddSubBlock
(
SCommitH
*
pCommith
,
SBlock
*
pBlock
,
SMergeInfo
*
pInfo
);
static
void
tsdbLoadAndMergeFromCache
(
STsdb
*
pTsdb
,
SDataCols
*
pDataCols
,
int
*
iter
,
SCommitIter
*
pCommitIter
,
SDataCols
*
pTarget
,
TSKEY
maxKey
,
int
maxRows
,
int8_t
update
);
static
void
tsdbLoadAndMergeFromCache
(
STsdb
*
pTsdb
,
SDataCols
*
pDataCols
,
int
*
iter
,
SCommitIter
*
pCommitIter
,
SDataCols
*
pTarget
,
TSKEY
maxKey
,
int
maxRows
,
int8_t
update
);
int
tsdbWriteBlockIdx
(
SDFile
*
pHeadf
,
SArray
*
pIdxA
,
void
**
ppBuf
);
int
tsdbApplyRtnOnFSet
(
STsdb
*
pRepo
,
SDFileSet
*
pSet
,
SRtn
*
pRtn
)
{
...
...
@@ -466,7 +466,7 @@ static int tsdbCreateCommitIters(SCommitH *pCommith) {
pTbData
=
(
STbData
*
)
pNode
->
pData
;
pCommitIter
=
pCommith
->
iters
+
i
;
pTSchema
=
metaGetTbTSchema
(
REPO_META
(
pRepo
),
pTbData
->
uid
,
1
);
// TODO: schema version
pTSchema
=
metaGetTbTSchema
(
REPO_META
(
pRepo
),
pTbData
->
uid
,
-
1
);
// TODO: schema version
if
(
pTSchema
)
{
pCommitIter
->
pIter
=
tSkipListCreateIter
(
pTbData
->
pData
);
...
...
@@ -948,7 +948,7 @@ static int tsdbMoveBlkIdx(SCommitH *pCommith, SBlockIdx *pIdx) {
}
static
int
tsdbSetCommitTable
(
SCommitH
*
pCommith
,
STable
*
pTable
)
{
STSchema
*
pSchema
=
tsdbGetTableSchemaImpl
(
TSDB_COMMIT_REPO
(
pCommith
),
pTable
,
false
,
false
,
-
1
);
STSchema
*
pSchema
=
tsdbGetTableSchemaImpl
(
TSDB_COMMIT_REPO
(
pCommith
),
pTable
,
false
,
false
,
-
1
);
pCommith
->
pTable
=
pTable
;
...
...
@@ -1422,8 +1422,8 @@ static int tsdbMergeBlockData(SCommitH *pCommith, SCommitIter *pIter, SDataCols
int
biter
=
0
;
while
(
true
)
{
tsdbLoadAndMergeFromCache
(
TSDB_COMMIT_REPO
(
pCommith
),
pCommith
->
readh
.
pDCols
[
0
],
&
biter
,
pIter
,
pCommith
->
pDataCols
,
keyLimit
,
defaultRows
,
pCfg
->
update
);
tsdbLoadAndMergeFromCache
(
TSDB_COMMIT_REPO
(
pCommith
),
pCommith
->
readh
.
pDCols
[
0
],
&
biter
,
pIter
,
pCommith
->
pDataCols
,
keyLimit
,
defaultRows
,
pCfg
->
update
);
if
(
pCommith
->
pDataCols
->
numOfRows
==
0
)
break
;
...
...
@@ -1447,8 +1447,8 @@ static int tsdbMergeBlockData(SCommitH *pCommith, SCommitIter *pIter, SDataCols
return
0
;
}
static
void
tsdbLoadAndMergeFromCache
(
STsdb
*
pTsdb
,
SDataCols
*
pDataCols
,
int
*
iter
,
SCommitIter
*
pCommitIter
,
SDataCols
*
pTarget
,
TSKEY
maxKey
,
int
maxRows
,
int8_t
update
)
{
static
void
tsdbLoadAndMergeFromCache
(
STsdb
*
pTsdb
,
SDataCols
*
pDataCols
,
int
*
iter
,
SCommitIter
*
pCommitIter
,
SDataCols
*
pTarget
,
TSKEY
maxKey
,
int
maxRows
,
int8_t
update
)
{
TSKEY
key1
=
INT64_MAX
;
TSKEY
key2
=
INT64_MAX
;
TSKEY
lastKey
=
TSKEY_INITIAL_VAL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录