Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e21ba163
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e21ba163
编写于
3月 31, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
revert uid
上级
b56ea026
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
29 addition
and
22 deletion
+29
-22
source/dnode/vnode/src/inc/tsdbCommit.h
source/dnode/vnode/src/inc/tsdbCommit.h
+1
-1
source/dnode/vnode/src/inc/tsdbDef.h
source/dnode/vnode/src/inc/tsdbDef.h
+1
-1
source/dnode/vnode/src/meta/metaTbUid.c
source/dnode/vnode/src/meta/metaTbUid.c
+1
-1
source/dnode/vnode/src/tq/tqRead.c
source/dnode/vnode/src/tq/tqRead.c
+1
-0
source/dnode/vnode/src/tsdb/tsdbCommit.c
source/dnode/vnode/src/tsdb/tsdbCommit.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+1
-1
source/dnode/vnode/src/tsdb/tsdbReadImpl.c
source/dnode/vnode/src/tsdb/tsdbReadImpl.c
+23
-17
未找到文件。
source/dnode/vnode/src/inc/tsdbCommit.h
浏览文件 @
e21ba163
...
...
@@ -74,4 +74,4 @@ int tsdbApplyRtn(STsdbRepo *pRepo);
}
#endif
#endif
/* _TD_TSDB_COMMIT_H_ */
\ No newline at end of file
#endif
/* _TD_TSDB_COMMIT_H_ */
source/dnode/vnode/src/inc/tsdbDef.h
浏览文件 @
e21ba163
...
...
@@ -79,4 +79,4 @@ static FORCE_INLINE STSchema *tsdbGetTableSchemaImpl(STable *pTable, bool lock,
}
#endif
#endif
/*_TD_TSDB_DEF_H_*/
\ No newline at end of file
#endif
/*_TD_TSDB_DEF_H_*/
source/dnode/vnode/src/meta/metaTbUid.c
浏览文件 @
e21ba163
...
...
@@ -27,5 +27,5 @@ void metaCloseUidGnrt(SMeta *pMeta) { /* TODO */
tb_uid_t
metaGenerateUid
(
SMeta
*
pMeta
)
{
// Generate a new table UID
return
tGenIdPI
64
();
return
tGenIdPI
32
();
}
source/dnode/vnode/src/tq/tqRead.c
浏览文件 @
e21ba163
...
...
@@ -168,6 +168,7 @@ SArray* tqRetrieveDataBlock(STqReadHandle* pHandle) {
break
;
}
if
(
colDataAppend
(
pColData
,
curRow
,
sVal
.
val
,
false
)
<
0
)
{
/*if (colDataAppend(pColData, curRow, sVal.val, sVal.valType == TD_VTYPE_NULL) < 0) {*/
taosArrayDestroyEx
(
pArray
,
(
void
(
*
)(
void
*
))
tDeleteSSDataBlock
);
return
NULL
;
}
...
...
source/dnode/vnode/src/tsdb/tsdbCommit.c
浏览文件 @
e21ba163
...
...
@@ -1394,7 +1394,7 @@ int tsdbWriteBlockImpl(STsdb *pRepo, STable *pTable, SDFile *pDFile, SDFile *pDF
tsdbDebug
(
"vgId:%d uid:%"
PRId64
" a block of data is written to file %s, offset %"
PRId64
" numOfRows %d len %d numOfCols %"
PRId16
" keyFirst %"
PRId64
" keyLast %"
PRId64
,
REPO_ID
(
pRepo
),
TABLE_
T
ID
(
pTable
),
TSDB_FILE_FULL_NAME
(
pDFile
),
offset
,
rowsToWrite
,
pBlock
->
len
,
REPO_ID
(
pRepo
),
TABLE_
U
ID
(
pTable
),
TSDB_FILE_FULL_NAME
(
pDFile
),
offset
,
rowsToWrite
,
pBlock
->
len
,
pBlock
->
numOfCols
,
pBlock
->
keyFirst
,
pBlock
->
keyLast
);
return
0
;
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
e21ba163
...
...
@@ -4068,4 +4068,4 @@ void getTableListfromSkipList(tExprNode *pExpr, SSkipList *pSkipList, SArray *re
//apply the hierarchical filter expression to every node in skiplist to find the qualified nodes
applyFilterToSkipListNode(pSkipList, pExpr, result, param);
}
#endif
\ No newline at end of file
#endif
source/dnode/vnode/src/tsdb/tsdbReadImpl.c
浏览文件 @
e21ba163
...
...
@@ -99,7 +99,7 @@ int tsdbSetAndOpenReadFSet(SReadH *pReadh, SDFileSet *pSet) {
void
tsdbCloseAndUnsetFSet
(
SReadH
*
pReadh
)
{
tsdbResetReadFile
(
pReadh
);
}
int
tsdbLoadBlockIdx
(
SReadH
*
pReadh
)
{
SDFile
*
pHeadf
=
TSDB_READ_HEAD_FILE
(
pReadh
);
SDFile
*
pHeadf
=
TSDB_READ_HEAD_FILE
(
pReadh
);
SBlockIdx
blkIdx
;
ASSERT
(
taosArrayGetSize
(
pReadh
->
aBlkIdx
)
==
0
);
...
...
@@ -181,13 +181,20 @@ int tsdbSetReadTable(SReadH *pReadh, STable *pTable) {
}
SBlockIdx
*
pBlkIdx
=
taosArrayGet
(
pReadh
->
aBlkIdx
,
pReadh
->
cidx
);
if
(
pBlkIdx
->
uid
==
TABLE_UID
(
pTable
))
{
pReadh
->
pBlkIdx
=
pBlkIdx
;
if
(
pBlkIdx
->
tid
==
TABLE_TID
(
pTable
))
{
if
(
pBlkIdx
->
uid
==
TABLE_UID
(
pTable
))
{
pReadh
->
pBlkIdx
=
pBlkIdx
;
}
else
{
pReadh
->
pBlkIdx
=
NULL
;
}
pReadh
->
cidx
++
;
break
;
}
else
{
}
else
if
(
pBlkIdx
->
tid
>
TABLE_TID
(
pTable
))
{
pReadh
->
pBlkIdx
=
NULL
;
break
;
}
else
{
pReadh
->
cidx
++
;
}
pReadh
->
cidx
++
;
}
}
else
{
pReadh
->
pBlkIdx
=
NULL
;
...
...
@@ -199,7 +206,7 @@ int tsdbSetReadTable(SReadH *pReadh, STable *pTable) {
int
tsdbLoadBlockInfo
(
SReadH
*
pReadh
,
void
*
pTarget
)
{
ASSERT
(
pReadh
->
pBlkIdx
!=
NULL
);
SDFile
*
pHeadf
=
TSDB_READ_HEAD_FILE
(
pReadh
);
SDFile
*
pHeadf
=
TSDB_READ_HEAD_FILE
(
pReadh
);
SBlockIdx
*
pBlkIdx
=
pReadh
->
pBlkIdx
;
if
(
tsdbSeekDFile
(
pHeadf
,
pBlkIdx
->
offset
,
SEEK_SET
)
<
0
)
{
...
...
@@ -269,8 +276,7 @@ int tsdbLoadBlockData(SReadH *pReadh, SBlock *pBlock, SBlockInfo *pBlkInfo) {
return
0
;
}
int
tsdbLoadBlockDataCols
(
SReadH
*
pReadh
,
SBlock
*
pBlock
,
SBlockInfo
*
pBlkInfo
,
const
int16_t
*
colIds
,
int
numOfColsIds
)
{
int
tsdbLoadBlockDataCols
(
SReadH
*
pReadh
,
SBlock
*
pBlock
,
SBlockInfo
*
pBlkInfo
,
const
int16_t
*
colIds
,
int
numOfColsIds
)
{
ASSERT
(
pBlock
->
numOfSubBlocks
>
0
);
int8_t
update
=
pReadh
->
pRepo
->
config
.
update
;
...
...
@@ -533,9 +539,9 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
pDataCols
->
numOfRows
=
pBlock
->
numOfRows
;
// Recover the data
int
ccol
=
0
;
// loop iter for SBlockCol object
int
dcol
=
0
;
// loop iter for SDataCols object
int
nBitmaps
=
(
int
)
TD_BITMAP_BYTES
(
pBlock
->
numOfRows
);
int
ccol
=
0
;
// loop iter for SBlockCol object
int
dcol
=
0
;
// loop iter for SDataCols object
int
nBitmaps
=
(
int
)
TD_BITMAP_BYTES
(
pBlock
->
numOfRows
);
SBlockCol
*
pBlockCol
=
NULL
;
while
(
dcol
<
pDataCols
->
numOfCols
)
{
SDataCol
*
pDataCol
=
&
(
pDataCols
->
cols
[
dcol
]);
...
...
@@ -580,8 +586,8 @@ static int tsdbLoadBlockDataImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *pDat
}
if
(
tsdbCheckAndDecodeColumnData
(
pDataCol
,
POINTER_SHIFT
(
pBlockData
,
tsize
+
toffset
),
tlen
,
pBlock
->
algorithm
,
pBlock
->
numOfRows
,
tBitmaps
,
tLenBitmap
,
pDataCols
->
maxPoints
,
TSDB_READ_COMP_BUF
(
pReadh
),
(
int
)
taosTSizeof
(
TSDB_READ_COMP_BUF
(
pReadh
)))
<
0
)
{
pBlock
->
numOfRows
,
tBitmaps
,
tLenBitmap
,
pDataCols
->
maxPoints
,
TSDB_READ_COMP_BUF
(
pReadh
),
(
int
)
taosTSizeof
(
TSDB_READ_COMP_BUF
(
pReadh
)))
<
0
)
{
tsdbError
(
"vgId:%d file %s is broken at column %d block offset %"
PRId64
" column offset %u"
,
TSDB_READ_REPO_ID
(
pReadh
),
TSDB_FILE_FULL_NAME
(
pDFile
),
tcolId
,
(
int64_t
)
pBlock
->
offset
,
toffset
);
return
-
1
;
...
...
@@ -656,7 +662,7 @@ static int tsdbLoadBlockDataColsImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *
ASSERT
(
pBlock
->
numOfSubBlocks
==
0
||
pBlock
->
numOfSubBlocks
==
1
);
ASSERT
(
colIds
[
0
]
==
PRIMARYKEY_TIMESTAMP_COL_ID
);
SDFile
*
pDFile
=
(
pBlock
->
last
)
?
TSDB_READ_LAST_FILE
(
pReadh
)
:
TSDB_READ_DATA_FILE
(
pReadh
);
SDFile
*
pDFile
=
(
pBlock
->
last
)
?
TSDB_READ_LAST_FILE
(
pReadh
)
:
TSDB_READ_DATA_FILE
(
pReadh
);
SBlockCol
blockCol
=
{
0
};
tdResetDataCols
(
pDataCols
);
...
...
@@ -670,7 +676,7 @@ static int tsdbLoadBlockDataColsImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *
int
ccol
=
0
;
for
(
int
i
=
0
;
i
<
numOfColIds
;
i
++
)
{
int16_t
colId
=
colIds
[
i
];
SDataCol
*
pDataCol
=
NULL
;
SDataCol
*
pDataCol
=
NULL
;
SBlockCol
*
pBlockCol
=
NULL
;
while
(
true
)
{
...
...
@@ -734,7 +740,7 @@ static int tsdbLoadBlockDataColsImpl(SReadH *pReadh, SBlock *pBlock, SDataCols *
static
int
tsdbLoadColData
(
SReadH
*
pReadh
,
SDFile
*
pDFile
,
SBlock
*
pBlock
,
SBlockCol
*
pBlockCol
,
SDataCol
*
pDataCol
)
{
ASSERT
(
pDataCol
->
colId
==
pBlockCol
->
colId
);
STsdb
*
pRepo
=
TSDB_READ_REPO
(
pReadh
);
STsdb
*
pRepo
=
TSDB_READ_REPO
(
pReadh
);
STsdbCfg
*
pCfg
=
REPO_CFG
(
pRepo
);
int
nBitmaps
=
(
int
)
TD_BITMAP_BYTES
(
pBlock
->
numOfRows
);
...
...
@@ -751,7 +757,7 @@ static int tsdbLoadColData(SReadH *pReadh, SDFile *pDFile, SBlock *pBlock, SBloc
}
}
int
tsize
=
pDataCol
->
bytes
*
pBlock
->
numOfRows
+
tLenBitmap
+
COMP_OVERFLOW_BYTES
;
int
tsize
=
pDataCol
->
bytes
*
pBlock
->
numOfRows
+
tLenBitmap
+
COMP_OVERFLOW_BYTES
;
if
(
tsdbMakeRoom
((
void
**
)(
&
TSDB_READ_BUF
(
pReadh
)),
pBlockCol
->
len
)
<
0
)
return
-
1
;
if
(
tsdbMakeRoom
((
void
**
)(
&
TSDB_READ_COMP_BUF
(
pReadh
)),
tsize
)
<
0
)
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录