Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f3929956
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
f3929956
编写于
5月 03, 2020
作者:
S
Steven Li
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into feature/crash_gen
上级
cc93971b
0d09f6c0
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
49 addition
and
14 deletion
+49
-14
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+1
-1
src/dnode/src/dnodeMgmt.c
src/dnode/src/dnodeMgmt.c
+24
-9
src/dnode/src/dnodeModule.c
src/dnode/src/dnodeModule.c
+3
-3
src/tsdb/inc/tsdbMain.h
src/tsdb/inc/tsdbMain.h
+18
-0
src/tsdb/src/tsdbMain.c
src/tsdb/src/tsdbMain.c
+2
-0
tests/script/basicSuite.sim
tests/script/basicSuite.sim
+1
-1
未找到文件。
src/common/inc/tdataformat.h
浏览文件 @
f3929956
...
@@ -174,7 +174,7 @@ typedef struct {
...
@@ -174,7 +174,7 @@ typedef struct {
#define keyCol(pCols) (&((pCols)->cols[0])) // Key column
#define keyCol(pCols) (&((pCols)->cols[0])) // Key column
#define dataColsKeyAt(pCols, idx) ((TSKEY *)(keyCol(pCols)->pData))[(idx)]
#define dataColsKeyAt(pCols, idx) ((TSKEY *)(keyCol(pCols)->pData))[(idx)]
#define dataColsKeyFirst(pCols) dataColsKeyAt(pCols, 0)
#define dataColsKeyFirst(pCols) dataColsKeyAt(pCols, 0)
#define dataColsKeyLast(pCols)
dataColsKeyAt(pCols, (pCols)->numOfPoints - 1
)
#define dataColsKeyLast(pCols)
((pCols->numOfPoints == 0) ? 0 : dataColsKeyAt(pCols, (pCols)->numOfPoints - 1)
)
SDataCols
*
tdNewDataCols
(
int
maxRowSize
,
int
maxCols
,
int
maxRows
);
SDataCols
*
tdNewDataCols
(
int
maxRowSize
,
int
maxCols
,
int
maxRows
);
void
tdResetDataCols
(
SDataCols
*
pCols
);
void
tdResetDataCols
(
SDataCols
*
pCols
);
...
...
src/dnode/src/dnodeMgmt.c
浏览文件 @
f3929956
...
@@ -71,13 +71,13 @@ void dnodeMgmt(SRpcMsg *pMsg) {
...
@@ -71,13 +71,13 @@ void dnodeMgmt(SRpcMsg *pMsg) {
rpcFreeCont
(
pMsg
->
pCont
);
rpcFreeCont
(
pMsg
->
pCont
);
}
}
static
int32_t
dnodeGetVnodeList
(
int32_t
vnodeList
[])
{
static
int32_t
dnodeGetVnodeList
(
int32_t
vnodeList
[]
,
int32_t
*
numOfVnodes
)
{
DIR
*
dir
=
opendir
(
tsVnodeDir
);
DIR
*
dir
=
opendir
(
tsVnodeDir
);
if
(
dir
==
NULL
)
{
if
(
dir
==
NULL
)
{
return
TSDB_CODE_NO_WRITE_ACCESS
;
return
TSDB_CODE_NO_WRITE_ACCESS
;
}
}
int32_t
numOfVnodes
=
0
;
*
numOfVnodes
=
0
;
struct
dirent
*
de
=
NULL
;
struct
dirent
*
de
=
NULL
;
while
((
de
=
readdir
(
dir
))
!=
NULL
)
{
while
((
de
=
readdir
(
dir
))
!=
NULL
)
{
if
(
strcmp
(
de
->
d_name
,
"."
)
==
0
||
strcmp
(
de
->
d_name
,
".."
)
==
0
)
continue
;
if
(
strcmp
(
de
->
d_name
,
"."
)
==
0
||
strcmp
(
de
->
d_name
,
".."
)
==
0
)
continue
;
...
@@ -86,21 +86,28 @@ static int32_t dnodeGetVnodeList(int32_t vnodeList[]) {
...
@@ -86,21 +86,28 @@ static int32_t dnodeGetVnodeList(int32_t vnodeList[]) {
int32_t
vnode
=
atoi
(
de
->
d_name
+
5
);
int32_t
vnode
=
atoi
(
de
->
d_name
+
5
);
if
(
vnode
==
0
)
continue
;
if
(
vnode
==
0
)
continue
;
vnodeList
[
numOfVnodes
]
=
vnode
;
vnodeList
[
*
numOfVnodes
]
=
vnode
;
numOfVnodes
++
;
(
*
numOfVnodes
)
++
;
}
}
}
}
closedir
(
dir
);
closedir
(
dir
);
return
numOfVnodes
;
return
TSDB_CODE_SUCCESS
;
}
}
static
int32_t
dnodeOpenVnodes
()
{
static
int32_t
dnodeOpenVnodes
()
{
char
vnodeDir
[
TSDB_FILENAME_LEN
*
3
];
char
vnodeDir
[
TSDB_FILENAME_LEN
*
3
];
int32_t
failed
=
0
;
int32_t
failed
=
0
;
int32_t
*
vnodeList
=
(
int32_t
*
)
malloc
(
sizeof
(
int32_t
)
*
TSDB_MAX_VNODES
);
int32_t
*
vnodeList
=
(
int32_t
*
)
malloc
(
sizeof
(
int32_t
)
*
TSDB_MAX_VNODES
);
int32_t
numOfVnodes
=
dnodeGetVnodeList
(
vnodeList
);
int32_t
numOfVnodes
;
int32_t
status
;
status
=
dnodeGetVnodeList
(
vnodeList
,
&
numOfVnodes
);
if
(
status
!=
TSDB_CODE_SUCCESS
)
{
dPrint
(
"Get dnode list failed"
);
return
status
;
}
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
snprintf
(
vnodeDir
,
TSDB_FILENAME_LEN
*
3
,
"%s/vnode%d"
,
tsVnodeDir
,
vnodeList
[
i
]);
snprintf
(
vnodeDir
,
TSDB_FILENAME_LEN
*
3
,
"%s/vnode%d"
,
tsVnodeDir
,
vnodeList
[
i
]);
...
@@ -115,7 +122,15 @@ static int32_t dnodeOpenVnodes() {
...
@@ -115,7 +122,15 @@ static int32_t dnodeOpenVnodes() {
static
void
dnodeCloseVnodes
()
{
static
void
dnodeCloseVnodes
()
{
int32_t
*
vnodeList
=
(
int32_t
*
)
malloc
(
sizeof
(
int32_t
)
*
TSDB_MAX_VNODES
);
int32_t
*
vnodeList
=
(
int32_t
*
)
malloc
(
sizeof
(
int32_t
)
*
TSDB_MAX_VNODES
);
int32_t
numOfVnodes
=
dnodeGetVnodeList
(
vnodeList
);
int32_t
numOfVnodes
;
int32_t
status
;
status
=
dnodeGetVnodeList
(
vnodeList
,
&
numOfVnodes
);
if
(
status
!=
TSDB_CODE_SUCCESS
)
{
dPrint
(
"Get dnode list failed"
);
return
;
}
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfVnodes
;
++
i
)
{
vnodeClose
(
vnodeList
[
i
]);
vnodeClose
(
vnodeList
[
i
]);
...
...
src/dnode/src/dnodeModule.c
浏览文件 @
f3929956
...
@@ -44,7 +44,7 @@ static void dnodeUnSetModuleStatus(int32_t module) {
...
@@ -44,7 +44,7 @@ static void dnodeUnSetModuleStatus(int32_t module) {
}
}
static
void
dnodeAllocModules
()
{
static
void
dnodeAllocModules
()
{
tsModule
[
TSDB_MOD_MGMT
].
name
=
false
;
tsModule
[
TSDB_MOD_MGMT
].
enable
=
false
;
tsModule
[
TSDB_MOD_MGMT
].
name
=
"mgmt"
;
tsModule
[
TSDB_MOD_MGMT
].
name
=
"mgmt"
;
tsModule
[
TSDB_MOD_MGMT
].
initFp
=
mgmtInitSystem
;
tsModule
[
TSDB_MOD_MGMT
].
initFp
=
mgmtInitSystem
;
tsModule
[
TSDB_MOD_MGMT
].
cleanUpFp
=
mgmtCleanUpSystem
;
tsModule
[
TSDB_MOD_MGMT
].
cleanUpFp
=
mgmtCleanUpSystem
;
...
...
src/tsdb/inc/tsdbMain.h
浏览文件 @
f3929956
...
@@ -20,11 +20,29 @@
...
@@ -20,11 +20,29 @@
#include "tsdb.h"
#include "tsdb.h"
#include "tskiplist.h"
#include "tskiplist.h"
#include "tutil.h"
#include "tutil.h"
#include "tlog.h"
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
extern
int
tsdbDebugFlag
;
#define tsdbError(...) \
if (tsdbDebugFlag & DEBUG_ERROR) { \
taosPrintLog("ERROR TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbWarn(...) \
if (tsdbDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbTrace(...) \
if (tsdbDebugFlag & DEBUG_TRACE) { \
taosPrintLog("TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbPrint(...) \
{ taosPrintLog("TSDB ", 255, __VA_ARGS__); }
// ------------------------------ TSDB META FILE INTERFACES ------------------------------
// ------------------------------ TSDB META FILE INTERFACES ------------------------------
#define TSDB_META_FILE_NAME "META"
#define TSDB_META_FILE_NAME "META"
#define TSDB_META_HASH_FRACTION 1.1
#define TSDB_META_HASH_FRACTION 1.1
...
...
src/tsdb/src/tsdbMain.c
浏览文件 @
f3929956
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include "tscompression.h"
#include "tscompression.h"
#include "tchecksum.h"
#include "tchecksum.h"
int
tsdbDebugFlag
=
135
;
#define TSDB_DEFAULT_PRECISION TSDB_PRECISION_MILLI // default precision
#define TSDB_DEFAULT_PRECISION TSDB_PRECISION_MILLI // default precision
#define IS_VALID_PRECISION(precision) (((precision) >= TSDB_PRECISION_MILLI) && ((precision) <= TSDB_PRECISION_NANO))
#define IS_VALID_PRECISION(precision) (((precision) >= TSDB_PRECISION_MILLI) && ((precision) <= TSDB_PRECISION_NANO))
#define TSDB_DEFAULT_COMPRESSION TWO_STAGE_COMP
#define TSDB_DEFAULT_COMPRESSION TWO_STAGE_COMP
...
...
tests/script/basicSuite.sim
浏览文件 @
f3929956
...
@@ -20,7 +20,7 @@ run general/table/tinyint.sim
...
@@ -20,7 +20,7 @@ run general/table/tinyint.sim
run general/table/db.table.sim
run general/table/db.table.sim
run general/user/basic1.sim
run general/user/basic1.sim
run general/user/pass_alter.sim
#
run general/user/pass_alter.sim
run general/user/pass_len.sim
run general/user/pass_len.sim
run general/user/user_create.sim
run general/user/user_create.sim
run general/user/user_len.sim
run general/user/user_len.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录