Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b8fb34e6
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看板
提交
b8fb34e6
编写于
6月 12, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact
上级
9a7f825d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
104 deletion
+0
-104
source/dnode/vnode/src/tsdb/dev/inc/tsdbDataFileRW.h
source/dnode/vnode/src/tsdb/dev/inc/tsdbDataFileRW.h
+0
-6
source/dnode/vnode/src/tsdb/dev/tsdbDataFileRW.c
source/dnode/vnode/src/tsdb/dev/tsdbDataFileRW.c
+0
-98
未找到文件。
source/dnode/vnode/src/tsdb/dev/inc/tsdbDataFileRW.h
浏览文件 @
b8fb34e6
...
...
@@ -58,12 +58,6 @@ int32_t tsdbDataFileReadBlockSma(SDataFileReader *reader, const SBrinRecord *rec
int32_t
tsdbDataFileReadTombBlk
(
SDataFileReader
*
reader
,
const
TTombBlkArray
**
tombBlkArray
);
int32_t
tsdbDataFileReadTombBlock
(
SDataFileReader
*
reader
,
const
STombBlk
*
tombBlk
,
STombBlock
*
tData
);
#if 0
int32_t tsdbDataFileReadBlockIdx(SDataFileReader *reader, const TBlockIdxArray **blockIdxArray);
int32_t tsdbDataFileReadDataBlk(SDataFileReader *reader, const SBlockIdx *blockIdx, const TDataBlkArray **dataBlkArray);
int32_t tsdbDataFileReadDataBlock(SDataFileReader *reader, const SDataBlk *dataBlk, SBlockData *bData);
#endif
// SDataFileWriter =============================================
typedef
struct
SDataFileWriter
SDataFileWriter
;
typedef
struct
SDataFileWriterConfig
{
...
...
source/dnode/vnode/src/tsdb/dev/tsdbDataFileRW.c
浏览文件 @
b8fb34e6
...
...
@@ -412,104 +412,6 @@ _exit:
return
code
;
}
#if 0
int32_t tsdbDataFileReadBlockIdx(SDataFileReader *reader, const TBlockIdxArray **blockIdxArray) {
int32_t code = 0;
int32_t lino = 0;
if (!reader->ctx->blockIdxLoaded) {
code = tsdbDataFileReadHeadFooter(reader);
TSDB_CHECK_CODE(code, lino, _exit);
TARRAY2_CLEAR(reader->blockIdxArray, NULL);
if (reader->fd[TSDB_FTYPE_HEAD] //
&& reader->headFooter->blockIdxPtr->size) {
code = tRealloc(&reader->config->bufArr[0], reader->headFooter->blockIdxPtr->size);
TSDB_CHECK_CODE(code, lino, _exit);
code = tsdbReadFile(reader->fd[TSDB_FTYPE_HEAD], reader->headFooter->blockIdxPtr->offset,
reader->config->bufArr[0], reader->headFooter->blockIdxPtr->size);
TSDB_CHECK_CODE(code, lino, _exit);
int32_t size = reader->headFooter->blockIdxPtr->size / sizeof(SBlockIdx);
for (int32_t i = 0; i < size; ++i) {
code = TARRAY2_APPEND_PTR(reader->blockIdxArray, ((SBlockIdx *)reader->config->bufArr[0]) + i);
TSDB_CHECK_CODE(code, lino, _exit);
}
}
reader->ctx->blockIdxLoaded = true;
}
blockIdxArray[0] = reader->blockIdxArray;
_exit:
if (code) {
TSDB_ERROR_LOG(TD_VID(reader->config->tsdb->pVnode), lino, code);
}
return code;
}
int32_t tsdbDataFileReadDataBlk(SDataFileReader *reader, const SBlockIdx *blockIdx,
const TDataBlkArray **dataBlkArray) {
ASSERT(reader->ctx->headFooterLoaded);
if (reader->ctx->tbid->suid == blockIdx->suid && reader->ctx->tbid->uid == blockIdx->uid) {
dataBlkArray[0] = reader->dataBlkArray;
return 0;
}
int32_t code = 0;
int32_t lino = 0;
reader->ctx->tbid->suid = blockIdx->suid;
reader->ctx->tbid->uid = blockIdx->uid;
TARRAY2_CLEAR(reader->dataBlkArray, NULL);
code = tRealloc(&reader->config->bufArr[0], blockIdx->size);
TSDB_CHECK_CODE(code, lino, _exit);
code = tsdbReadFile(reader->fd[TSDB_FTYPE_HEAD], blockIdx->offset, reader->config->bufArr[0], blockIdx->size);
TSDB_CHECK_CODE(code, lino, _exit);
int32_t size = blockIdx->size / sizeof(SDataBlk);
for (int32_t i = 0; i < size; ++i) {
code = TARRAY2_APPEND_PTR(reader->dataBlkArray, ((SDataBlk *)reader->config->bufArr[0]) + i);
TSDB_CHECK_CODE(code, lino, _exit);
}
dataBlkArray[0] = reader->dataBlkArray;
_exit:
if (code) {
TSDB_ERROR_LOG(TD_VID(reader->config->tsdb->pVnode), lino, code);
}
return code;
}
int32_t tsdbDataFileReadDataBlock(SDataFileReader *reader, const SDataBlk *dataBlk, SBlockData *bData) {
int32_t code = 0;
int32_t lino = 0;
code = tRealloc(&reader->config->bufArr[0], dataBlk->aSubBlock->szBlock);
TSDB_CHECK_CODE(code, lino, _exit);
code = tsdbReadFile(reader->fd[TSDB_FTYPE_DATA], dataBlk->aSubBlock->offset, reader->config->bufArr[0],
dataBlk->aSubBlock->szBlock);
TSDB_CHECK_CODE(code, lino, _exit);
code = tDecmprBlockData(reader->config->bufArr[0], dataBlk->aSubBlock->szBlock, bData, &reader->config->bufArr[1]);
TSDB_CHECK_CODE(code, lino, _exit);
_exit:
if (code) {
TSDB_ERROR_LOG(TD_VID(reader->config->tsdb->pVnode), lino, code);
}
return code;
}
#endif
int32_t
tsdbDataFileReadTombBlk
(
SDataFileReader
*
reader
,
const
TTombBlkArray
**
tombBlkArray
)
{
int32_t
code
=
0
;
int32_t
lino
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录