Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0ef8afbd
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看板
提交
0ef8afbd
编写于
6月 16, 2023
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support fill history
上级
8cb8c054
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
107 addition
and
107 deletion
+107
-107
include/libs/function/function.h
include/libs/function/function.h
+5
-5
source/libs/stream/inc/streamBackendRocksdb.h
source/libs/stream/inc/streamBackendRocksdb.h
+1
-1
source/libs/stream/inc/streamInc.h
source/libs/stream/inc/streamInc.h
+1
-1
source/libs/stream/src/streamBackendRocksdb.c
source/libs/stream/src/streamBackendRocksdb.c
+94
-94
source/libs/stream/src/streamMeta.c
source/libs/stream/src/streamMeta.c
+3
-3
source/libs/stream/src/streamState.c
source/libs/stream/src/streamState.c
+3
-3
未找到文件。
include/libs/function/function.h
浏览文件 @
0ef8afbd
...
...
@@ -130,7 +130,7 @@ typedef struct SSerializeDataHandle {
// incremental state storage
typedef
struct
SBackendWrapper
{
typedef
struct
SBackend
Cf
Wrapper
{
void
*
rocksdb
;
void
**
pHandle
;
void
*
writeOpts
;
...
...
@@ -146,11 +146,11 @@ typedef struct SBackendWrapper {
bool
remove
;
int64_t
backendId
;
char
idstr
[
64
];
}
SBackendWrapper
;
}
SBackend
Cf
Wrapper
;
typedef
struct
STdbState
{
SBackend
Wrapper
*
pBackend
Wrapper
;
int64_t
backend
WrapperId
;
char
idstr
[
64
];
SBackend
CfWrapper
*
pBackendCf
Wrapper
;
int64_t
backendCf
WrapperId
;
char
idstr
[
64
];
struct
SStreamTask
*
pOwner
;
void
*
db
;
...
...
source/libs/stream/inc/streamBackendRocksdb.h
浏览文件 @
0ef8afbd
...
...
@@ -42,7 +42,7 @@ typedef struct {
TdThreadMutex
cfMutex
;
SHashObj
*
cfInst
;
int64_t
defaultCfInit
;
}
SBackend
Handle
;
}
SBackend
Wrapper
;
void
*
streamBackendInit
(
const
char
*
path
);
void
streamBackendCleanup
(
void
*
arg
);
...
...
source/libs/stream/inc/streamInc.h
浏览文件 @
0ef8afbd
...
...
@@ -55,7 +55,7 @@ int32_t streamDoDispatchScanHistoryFinishMsg(SStreamTask* pTask, const SStreamRe
SStreamQueueItem
*
streamMergeQueueItem
(
SStreamQueueItem
*
dst
,
SStreamQueueItem
*
pElem
);
extern
int32_t
streamBackendId
;
extern
int32_t
streamBackendWrapperId
;
extern
int32_t
streamBackend
Cf
WrapperId
;
#ifdef __cplusplus
}
...
...
source/libs/stream/src/streamBackendRocksdb.c
浏览文件 @
0ef8afbd
此差异已折叠。
点击以展开。
source/libs/stream/src/streamMeta.c
浏览文件 @
0ef8afbd
...
...
@@ -21,16 +21,16 @@
static
TdThreadOnce
streamMetaModuleInit
=
PTHREAD_ONCE_INIT
;
int32_t
streamBackendId
=
0
;
int32_t
streamBackendWrapperId
=
0
;
int32_t
streamBackend
Cf
WrapperId
=
0
;
static
void
streamMetaEnvInit
()
{
streamBackendId
=
taosOpenRef
(
64
,
streamBackendCleanup
);
streamBackendWrapperId
=
taosOpenRef
(
64
,
streamBackendHandleCleanup
);
streamBackend
Cf
WrapperId
=
taosOpenRef
(
64
,
streamBackendHandleCleanup
);
}
void
streamMetaInit
()
{
taosThreadOnce
(
&
streamMetaModuleInit
,
streamMetaEnvInit
);
}
void
streamMetaCleanup
()
{
taosCloseRef
(
streamBackendId
);
taosCloseRef
(
streamBackendWrapperId
);
taosCloseRef
(
streamBackend
Cf
WrapperId
);
}
SStreamMeta
*
streamMetaOpen
(
const
char
*
path
,
void
*
ahandle
,
FTaskExpand
expandFunc
,
int32_t
vgId
)
{
...
...
source/libs/stream/src/streamState.c
浏览文件 @
0ef8afbd
...
...
@@ -134,11 +134,11 @@ SStreamState* streamStateOpen(char* path, void* pTask, bool specPath, int32_t sz
return
NULL
;
}
taosHashPut
(
pMeta
->
pTaskBackendUnique
,
pState
->
pTdbState
->
idstr
,
strlen
(
pState
->
pTdbState
->
idstr
)
+
1
,
&
pState
->
pTdbState
->
backend
WrapperId
,
sizeof
(
pState
->
pTdbState
->
backend
WrapperId
));
&
pState
->
pTdbState
->
backend
CfWrapperId
,
sizeof
(
pState
->
pTdbState
->
backendCf
WrapperId
));
}
else
{
int64_t
id
=
*
(
int64_t
*
)
uniqueId
;
pState
->
pTdbState
->
backendWrapperId
=
id
;
pState
->
pTdbState
->
pBackend
Wrapper
=
taosAcquireRef
(
streamBackend
WrapperId
,
id
);
pState
->
pTdbState
->
backend
Cf
WrapperId
=
id
;
pState
->
pTdbState
->
pBackend
CfWrapper
=
taosAcquireRef
(
streamBackendCf
WrapperId
,
id
);
taosAcquireRef
(
streamBackendId
,
pState
->
streamBackendRid
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录