Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ebf1a91f
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
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看板
提交
ebf1a91f
编写于
7月 24, 2023
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
enh: read/write from disk cache
上级
ae8caa82
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
151 addition
and
261 deletion
+151
-261
source/libs/executor/inc/groupcache.h
source/libs/executor/inc/groupcache.h
+36
-42
source/libs/executor/src/groupcacheoperator.c
source/libs/executor/src/groupcacheoperator.c
+115
-219
未找到文件。
source/libs/executor/inc/groupcache.h
浏览文件 @
ebf1a91f
...
@@ -24,19 +24,11 @@ extern "C" {
...
@@ -24,19 +24,11 @@ extern "C" {
#pragma pack(push, 1)
#pragma pack(push, 1)
typedef
struct
SGcBlkBufBasic
{
typedef
struct
SGcBlkBufBasic
{
uint32_t
fileId
;
int64_t
blkId
;
int64_t
blkId
;
int64_t
offset
;
int64_t
offset
;
int64_t
bufSize
;
int64_t
bufSize
;
}
SGcBlkBufBasic
;
}
SGcBlkBufBasic
;
typedef
struct
SGcBlkBufInfo
{
SGcBlkBufBasic
basic
;
uint32_t
fileId
;
void
*
next
;
void
*
pBuf
;
SGcDownstreamCtx
*
pCtx
;
SGroupCacheData
*
pGroup
;
}
SGcBlkBufInfo
;
#pragma pack(pop)
#pragma pack(pop)
typedef
struct
SGroupCacheFileFd
{
typedef
struct
SGroupCacheFileFd
{
...
@@ -44,25 +36,40 @@ typedef struct SGroupCacheFileFd {
...
@@ -44,25 +36,40 @@ typedef struct SGroupCacheFileFd {
TdFilePtr
fd
;
TdFilePtr
fd
;
}
SGroupCacheFileFd
;
}
SGroupCacheFileFd
;
typedef
struct
SGcVgroupCtx
{
typedef
struct
SGcFileCacheCtx
{
SArray
*
pTbList
;
uint64_t
lastUid
;
int64_t
fileSize
;
int64_t
fileSize
;
uint32_t
fileId
;
uint32_t
fileId
;
S
SHashObj
*
pCacheFile
;
S
HashObj
*
pCacheFile
;
int32_t
baseNameLen
;
int32_t
baseNameLen
;
char
baseFilename
[
PATH_MAX
];
char
baseFilename
[
PATH_MAX
];
}
SGcVgroupCtx
;
}
SGcFileCacheCtx
;
typedef
struct
SGcDownstreamCtx
{
int32_t
id
;
SRWLatch
grpLock
;
int64_t
fetchSessionId
;
SArray
*
pNewGrpList
;
// SArray<SGcNewGroupInfo>
SSHashObj
*
pVgTbHash
;
SHashObj
*
pGrpHash
;
SRWLatch
blkLock
;
SSDataBlock
*
pBaseBlock
;
SArray
*
pFreeBlock
;
int64_t
lastBlkUid
;
SHashObj
*
pSessions
;
SHashObj
*
pWaitSessions
;
SGcFileCacheCtx
fileCtx
;
}
SGcDownstreamCtx
;
typedef
struct
SGroupSeqBlkList
{
typedef
struct
SGcVgroupCtx
{
SRWLatch
lock
;
SArray
*
pTbList
;
SArray
*
pList
;
uint64_t
lastBlkUid
;
}
SGroupSeqBlkList
;
SGcFileCacheCtx
fileCtx
;
}
SGcVgroupCtx
;
typedef
struct
SG
roupBatch
BlkList
{
typedef
struct
SG
c
BlkList
{
SRWLatch
lock
;
SRWLatch
lock
;
SArray
*
pList
;
SArray
*
pList
;
}
SG
roupBatch
BlkList
;
}
SG
c
BlkList
;
typedef
struct
SGroupCacheData
{
typedef
struct
SGroupCacheData
{
TdThreadMutex
mutex
;
TdThreadMutex
mutex
;
...
@@ -72,10 +79,7 @@ typedef struct SGroupCacheData {
...
@@ -72,10 +79,7 @@ typedef struct SGroupCacheData {
SGcVgroupCtx
*
pVgCtx
;
SGcVgroupCtx
*
pVgCtx
;
int32_t
downstreamIdx
;
int32_t
downstreamIdx
;
int32_t
vgId
;
int32_t
vgId
;
union
{
SGcBlkList
blkList
;
SGroupSeqBlkList
seqList
;
SGroupBatchBlkList
batchList
;
};
uint32_t
fileId
;
uint32_t
fileId
;
int64_t
startOffset
;
int64_t
startOffset
;
}
SGroupCacheData
;
}
SGroupCacheData
;
...
@@ -103,24 +107,6 @@ typedef struct SGcNewGroupInfo {
...
@@ -103,24 +107,6 @@ typedef struct SGcNewGroupInfo {
SOperatorParam
*
pParam
;
SOperatorParam
*
pParam
;
}
SGcNewGroupInfo
;
}
SGcNewGroupInfo
;
typedef
struct
SGcDownstreamCtx
{
int32_t
id
;
SRWLatch
grpLock
;
int64_t
fetchSessionId
;
SArray
*
pNewGrpList
;
// SArray<SGcNewGroupInfo>
SSHashObj
*
pVgTbHash
;
SHashObj
*
pGrpHash
;
SRWLatch
blkLock
;
SSDataBlock
*
pBaseBlock
;
SArray
*
pFreeBlock
;
int64_t
lastBlkUid
;
SHashObj
*
pSessions
;
SHashObj
*
pWaitSessions
;
int32_t
cacheFileFdNum
;
SGroupCacheFileFd
cacheFileFd
;
char
baseFilename
[
PATH_MAX
];
}
SGcDownstreamCtx
;
typedef
struct
SGcSessionCtx
{
typedef
struct
SGcSessionCtx
{
int32_t
downstreamIdx
;
int32_t
downstreamIdx
;
SGcOperatorParam
*
pParam
;
SGcOperatorParam
*
pParam
;
...
@@ -131,6 +117,14 @@ typedef struct SGcSessionCtx {
...
@@ -131,6 +117,14 @@ typedef struct SGcSessionCtx {
bool
newFetch
;
bool
newFetch
;
}
SGcSessionCtx
;
}
SGcSessionCtx
;
typedef
struct
SGcBlkBufInfo
{
SGcBlkBufBasic
basic
;
void
*
next
;
void
*
pBuf
;
SGcDownstreamCtx
*
pCtx
;
SGroupCacheData
*
pGroup
;
}
SGcBlkBufInfo
;
typedef
struct
SGcExecInfo
{
typedef
struct
SGcExecInfo
{
int32_t
downstreamNum
;
int32_t
downstreamNum
;
int64_t
*
pDownstreamBlkNum
;
int64_t
*
pDownstreamBlkNum
;
...
...
source/libs/executor/src/groupcacheoperator.c
浏览文件 @
ebf1a91f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录