Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7444bf50
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看板
提交
7444bf50
编写于
11月 05, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
826e3c58
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
56 addition
and
35 deletion
+56
-35
include/dnode/mnode/sdb/sdb.h
include/dnode/mnode/sdb/sdb.h
+29
-1
source/dnode/mnode/impl/CMakeLists.txt
source/dnode/mnode/impl/CMakeLists.txt
+1
-0
source/dnode/mnode/impl/inc/mnodeDef.h
source/dnode/mnode/impl/inc/mnodeDef.h
+1
-26
source/dnode/mnode/impl/src/mnodeAcct.c
source/dnode/mnode/impl/src/mnodeAcct.c
+1
-1
source/dnode/mnode/impl/src/mnodeUser.c
source/dnode/mnode/impl/src/mnodeUser.c
+1
-1
source/dnode/mnode/impl/src/mnodeWorker.c
source/dnode/mnode/impl/src/mnodeWorker.c
+1
-1
source/dnode/mnode/impl/src/mondeInt.c
source/dnode/mnode/impl/src/mondeInt.c
+1
-1
source/dnode/mnode/sdb/CMakeLists.txt
source/dnode/mnode/sdb/CMakeLists.txt
+5
-2
source/dnode/mnode/sdb/src/sdb.c
source/dnode/mnode/sdb/src/sdb.c
+15
-1
source/dnode/mnode/transaction/CMakeLists.txt
source/dnode/mnode/transaction/CMakeLists.txt
+1
-1
未找到文件。
include/dnode/mnode/sdb/sdb.h
浏览文件 @
7444bf50
...
@@ -16,12 +16,40 @@
...
@@ -16,12 +16,40 @@
#ifndef _TD_MNODE_SDB_H_
#ifndef _TD_MNODE_SDB_H_
#define _TD_MNODE_SDB_H_
#define _TD_MNODE_SDB_H_
#include "
mnodeInt
.h"
#include "
cJSON
.h"
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
typedef
enum
{
MN_SDB_START
=
0
,
MN_SDB_CLUSTER
=
1
,
MN_SDB_DNODE
=
2
,
MN_SDB_MNODE
=
3
,
MN_SDB_ACCT
=
4
,
MN_SDB_AUTH
=
5
,
MN_SDB_USER
=
6
,
MN_SDB_DB
=
7
,
MN_SDB_VGROUP
=
8
,
MN_SDB_STABLE
=
9
,
MN_SDB_FUNC
=
10
,
MN_SDB_OPER
=
11
,
MN_SDB_MAX
=
12
}
EMnSdb
;
typedef
enum
{
MN_OP_START
=
0
,
MN_OP_INSERT
=
1
,
MN_OP_UPDATE
=
2
,
MN_OP_DELETE
=
3
,
MN_OP_MAX
=
4
}
EMnOp
;
typedef
enum
{
MN_KEY_START
=
0
,
MN_KEY_BINARY
=
1
,
MN_KEY_INT32
=
2
,
MN_KEY_INT64
=
3
,
MN_KEY_MAX
}
EMnKey
;
typedef
enum
{
MN_SDB_STAT_AVAIL
=
0
,
MN_SDB_STAT_DROPPED
=
1
}
EMnSdbStat
;
typedef
struct
{
int8_t
type
;
int8_t
status
;
int8_t
align
[
6
];
}
SdbHead
;
typedef
void
(
*
SdbDeployFp
)();
typedef
void
(
*
SdbDeployFp
)();
typedef
void
*
(
*
SdbDecodeFp
)(
cJSON
*
root
);
typedef
void
*
(
*
SdbDecodeFp
)(
cJSON
*
root
);
typedef
int32_t
(
*
SdbEncodeFp
)(
void
*
pHead
,
char
*
buf
,
int32_t
maxLen
);
typedef
int32_t
(
*
SdbEncodeFp
)(
void
*
pHead
,
char
*
buf
,
int32_t
maxLen
);
...
...
source/dnode/mnode/impl/CMakeLists.txt
浏览文件 @
7444bf50
...
@@ -7,6 +7,7 @@ target_include_directories(
...
@@ -7,6 +7,7 @@ target_include_directories(
)
)
target_link_libraries
(
target_link_libraries
(
mnode
mnode
PRIVATE sdb
PUBLIC transport
PUBLIC transport
PUBLIC cjson
PUBLIC cjson
)
)
\ No newline at end of file
source/dnode/mnode/impl/inc/mnodeDef.h
浏览文件 @
7444bf50
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include "thash.h"
#include "thash.h"
#include "cJSON.h"
#include "cJSON.h"
#include "mnode.h"
#include "mnode.h"
#include "sdb.h"
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
@@ -59,26 +60,6 @@ typedef struct SFuncObj SFuncObj;
...
@@ -59,26 +60,6 @@ typedef struct SFuncObj SFuncObj;
typedef
struct
SOperObj
SOperObj
;
typedef
struct
SOperObj
SOperObj
;
typedef
struct
SMnMsg
SMnMsg
;
typedef
struct
SMnMsg
SMnMsg
;
typedef
enum
{
MN_SDB_START
=
0
,
MN_SDB_CLUSTER
=
1
,
MN_SDB_DNODE
=
2
,
MN_SDB_MNODE
=
3
,
MN_SDB_ACCT
=
4
,
MN_SDB_AUTH
=
5
,
MN_SDB_USER
=
6
,
MN_SDB_DB
=
7
,
MN_SDB_VGROUP
=
8
,
MN_SDB_STABLE
=
9
,
MN_SDB_FUNC
=
10
,
MN_SDB_OPER
=
11
,
MN_SDB_MAX
=
12
}
EMnSdb
;
typedef
enum
{
MN_OP_START
=
0
,
MN_OP_INSERT
=
1
,
MN_OP_UPDATE
=
2
,
MN_OP_DELETE
=
3
,
MN_OP_MAX
=
4
}
EMnOp
;
typedef
enum
{
MN_KEY_START
=
0
,
MN_KEY_BINARY
=
1
,
MN_KEY_INT32
=
2
,
MN_KEY_INT64
=
3
,
MN_KEY_MAX
}
EMnKey
;
typedef
enum
{
typedef
enum
{
MN_AUTH_ACCT_START
=
0
,
MN_AUTH_ACCT_START
=
0
,
MN_AUTH_ACCT_USER
,
MN_AUTH_ACCT_USER
,
...
@@ -97,13 +78,7 @@ typedef enum {
...
@@ -97,13 +78,7 @@ typedef enum {
MN_AUTH_MAX
MN_AUTH_MAX
}
EMnAuthOp
;
}
EMnAuthOp
;
typedef
enum
{
MN_SDB_STAT_AVAIL
=
0
,
MN_SDB_STAT_DROPPED
=
1
}
EMnSdbStat
;
typedef
struct
{
int8_t
type
;
int8_t
status
;
int8_t
align
[
6
];
}
SdbHead
;
typedef
struct
SClusterObj
{
typedef
struct
SClusterObj
{
SdbHead
head
;
SdbHead
head
;
...
...
source/dnode/mnode/impl/src/mnodeAcct.c
浏览文件 @
7444bf50
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#define _DEFAULT_SOURCE
#define _DEFAULT_SOURCE
#include "os.h"
#include "os.h"
#include "mnode
Sdb
.h"
#include "mnode
Int
.h"
static
void
mnodeCreateDefaultAcct
()
{
static
void
mnodeCreateDefaultAcct
()
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
source/dnode/mnode/impl/src/mnodeUser.c
浏览文件 @
7444bf50
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "os.h"
#include "os.h"
#include "tkey.h"
#include "tkey.h"
#include "tglobal.h"
#include "tglobal.h"
#include "mnode
Sdb
.h"
#include "mnode
Int
.h"
static
int32_t
mnodeCreateDefaultUser
(
char
*
acct
,
char
*
user
,
char
*
pass
)
{
static
int32_t
mnodeCreateDefaultUser
(
char
*
acct
,
char
*
user
,
char
*
pass
)
{
int32_t
code
=
TSDB_CODE_SUCCESS
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
...
...
source/dnode/mnode/impl/src/mnodeWorker.c
浏览文件 @
7444bf50
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#include "tworker.h"
#include "tworker.h"
#include "tglobal.h"
#include "tglobal.h"
#include "mnodeMnode.h"
#include "mnodeMnode.h"
#include "mnode
Sdb
.h"
#include "mnode
Int
.h"
#include "mnodeShow.h"
#include "mnodeShow.h"
#include "mnodeSync.h"
#include "mnodeSync.h"
#include "mnodeWorker.h"
#include "mnodeWorker.h"
...
...
source/dnode/mnode/impl/src/mondeInt.c
浏览文件 @
7444bf50
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "mnodeMnode.h"
#include "mnodeMnode.h"
#include "mnodeOper.h"
#include "mnodeOper.h"
#include "mnodeProfile.h"
#include "mnodeProfile.h"
#include "mnode
Sdb
.h"
#include "mnode
Int
.h"
#include "mnodeShow.h"
#include "mnodeShow.h"
#include "mnodeStable.h"
#include "mnodeStable.h"
#include "mnodeSync.h"
#include "mnodeSync.h"
...
...
source/dnode/mnode/sdb/CMakeLists.txt
浏览文件 @
7444bf50
...
@@ -2,10 +2,13 @@ aux_source_directory(src MNODE_SRC)
...
@@ -2,10 +2,13 @@ aux_source_directory(src MNODE_SRC)
add_library
(
sdb
${
MNODE_SRC
}
)
add_library
(
sdb
${
MNODE_SRC
}
)
target_include_directories
(
target_include_directories
(
sdb
sdb
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/dnode/mnode/sdb
/inc
"
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/dnode/mnode/sdb"
private
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
private
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
)
)
target_link_libraries
(
target_link_libraries
(
sdb
sdb
PUBLIC transport
PRIVATE os
PRIVATE common
PRIVATE util
PRIVATE cjson
)
)
\ No newline at end of file
source/dnode/mnode/sdb/src/sdb.c
浏览文件 @
7444bf50
...
@@ -18,7 +18,21 @@
...
@@ -18,7 +18,21 @@
#include "thash.h"
#include "thash.h"
#include "tglobal.h"
#include "tglobal.h"
#include "cJSON.h"
#include "cJSON.h"
#include "mnodeSdb.h"
#include "sdb.h"
#include "os.h"
#include "taosmsg.h"
#include "tlog.h"
extern
int32_t
mDebugFlag
;
// mnode log function
#define mFatal(...) { if (mDebugFlag & DEBUG_FATAL) { taosPrintLog("MND FATAL ", 255, __VA_ARGS__); }}
#define mError(...) { if (mDebugFlag & DEBUG_ERROR) { taosPrintLog("MND ERROR ", 255, __VA_ARGS__); }}
#define mWarn(...) { if (mDebugFlag & DEBUG_WARN) { taosPrintLog("MND WARN ", 255, __VA_ARGS__); }}
#define mInfo(...) { if (mDebugFlag & DEBUG_INFO) { taosPrintLog("MND ", 255, __VA_ARGS__); }}
#define mDebug(...) { if (mDebugFlag & DEBUG_DEBUG) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); }}
#define mTrace(...) { if (mDebugFlag & DEBUG_TRACE) { taosPrintLog("MND ", mDebugFlag, __VA_ARGS__); }}
static
struct
{
static
struct
{
char
currDir
[
PATH_MAX
];
char
currDir
[
PATH_MAX
];
...
...
source/dnode/mnode/transaction/CMakeLists.txt
浏览文件 @
7444bf50
...
@@ -2,7 +2,7 @@ aux_source_directory(src MNODE_SRC)
...
@@ -2,7 +2,7 @@ aux_source_directory(src MNODE_SRC)
add_library
(
transaction
${
MNODE_SRC
}
)
add_library
(
transaction
${
MNODE_SRC
}
)
target_include_directories
(
target_include_directories
(
transaction
transaction
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/dnode/mnode/transaction
/inc
"
PUBLIC
"
${
CMAKE_SOURCE_DIR
}
/include/dnode/mnode/transaction"
private
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
private
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/inc"
)
)
target_link_libraries
(
target_link_libraries
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录