Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
066d11ce
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看板
提交
066d11ce
编写于
10月 08, 2021
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add tq header
上级
0f3db7d7
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
18 deletion
+37
-18
include/libs/wal/wal.h
include/libs/wal/wal.h
+7
-4
include/server/vnode/tq/tq.h
include/server/vnode/tq/tq.h
+11
-9
source/libs/wal/CMakeLists.txt
source/libs/wal/CMakeLists.txt
+6
-1
source/server/vnode/tq/CMakeLists.txt
source/server/vnode/tq/CMakeLists.txt
+1
-1
source/server/vnode/tq/inc/tqInt.h
source/server/vnode/tq/inc/tqInt.h
+2
-0
source/server/vnode/tq/src/tq.c
source/server/vnode/tq/src/tq.c
+10
-3
未找到文件。
include/libs/wal/wal.h
浏览文件 @
066d11ce
...
...
@@ -15,13 +15,16 @@
#ifndef _TD_WAL_H_
#define _TD_WAL_H_
#include "os.h"
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
enum
{
TAOS_WAL_NOLOG
=
0
,
TAOS_WAL_WRITE
=
1
TAOS_WAL_WRITE
=
1
,
TAOS_WAL_FSYNC
=
2
}
EWalType
;
typedef
struct
{
...
...
@@ -55,8 +58,8 @@ void walStop(twalh);
void
walClose
(
twalh
);
//write
int
32
_t
walWrite
(
twalh
,
int8_t
msgType
,
void
*
body
,
uint32_t
bodyLen
);
void
wal
Wait
Fsync
(
twalh
,
bool
forceHint
);
int
64
_t
walWrite
(
twalh
,
int8_t
msgType
,
void
*
body
,
uint32_t
bodyLen
);
void
walFsync
(
twalh
,
bool
forceHint
);
//int32_t walCommit(twalh, uint64_t ver);
//int32_t walRollback(twalh, uint64_t ver);
...
...
@@ -67,7 +70,7 @@ int32_t walReadWithFp(twalh, FWalWrite writeFp, int64_t verStart, int readNum);
//life cycle
int32_t
walDataPersisted
(
twalh
,
int64_t
ver
);
int32_t
walFirstVer
(
twalh
);
int32_t
walLastVer
(
twal
);
int32_t
walLastVer
(
twal
h
);
//int32_t walDataCorrupted(twalh);
#ifdef __cplusplus
...
...
include/server/vnode/tq/tq.h
浏览文件 @
066d11ce
...
...
@@ -24,22 +24,24 @@ extern "C" {
typedef
struct
STQ
STQ
;
STQ
*
tqInit
();
void
tqCleanUp
(
STQ
*
pT
Q
);
STQ
*
tqInit
(
void
*
ref_func
(
void
*
),
void
*
unref_func
(
void
*
)
);
void
tqCleanUp
(
STQ
*
pT
q
);
//create persistent storage for meta info such as consuming offset
//return value > 0: cgId
//return value < 0: error code
int
tqCreateGroup
(
STQ
*
pTQ
);
//return value <
=
0: error code
int
tqCreateGroup
(
STQ
*
);
//create ring buffer in memory and load consuming offset
int
tqOpenGroup
(
STQ
*
pTQ
,
int
cgId
);
int
tqOpenGroup
(
STQ
*
,
int
cgId
);
//destroy ring buffer and persist consuming offset
int
tqCloseGroup
(
STQ
*
pTQ
,
int
cgId
);
int
tqCloseGroup
(
STQ
*
,
int
cgId
);
//delete persistent storage for meta info
int
tqDropGroup
(
STQ
*
pTQ
);
int
tqDropGroup
(
STQ
*
,
int
cgId
);
int
tqPushMsg
(
STQ
*
pTQ
,
void
*
,
int64_t
version
);
int
tqCommit
(
STQ
*
pTQ
);
int
tqPushMsg
(
STQ
*
,
void
*
,
int64_t
version
);
int
tqCommit
(
STQ
*
);
int
tqHandleMsg
(
STQ
*
,
void
*
msg
);
#ifdef __cplusplus
}
...
...
source/libs/wal/CMakeLists.txt
浏览文件 @
066d11ce
...
...
@@ -4,4 +4,9 @@ target_include_directories(
wal
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/libs/wal"
PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
)
\ No newline at end of file
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/include/os"
)
target_link_libraries
(
os
)
source/server/vnode/tq/CMakeLists.txt
浏览文件 @
066d11ce
...
...
@@ -3,8 +3,8 @@ add_library(tq ${TQ_SRC})
target_include_directories
(
tq
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/server/vnode/tq"
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/include/os"
PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/include/os"
)
target_link_libraries
(
...
...
source/server/vnode/tq/inc/tqInt.h
浏览文件 @
066d11ce
...
...
@@ -16,6 +16,8 @@
#ifndef _TD_TQ_INT_H_
#define _TD_TQ_INT_H_
#include "tq.h"
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
source/server/vnode/tq/src/tq.c
浏览文件 @
066d11ce
...
...
@@ -13,14 +13,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tq.h"
#include "tq
Int
.h"
int
tqPushMsg
(
STQ
*
pTQ
,
void
*
p
,
int64_t
version
)
{
//static
//read next version data
//
//send to fetch queue
//
//handle management message
int
tqPushMsg
(
STQ
*
pTq
,
void
*
p
,
int64_t
version
)
{
//add reference
//
return
0
;
}
int
tqCommit
(
STQ
*
pTQ
)
{
int
tqCommit
(
STQ
*
pTq
)
{
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录