Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4e390996
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看板
未验证
提交
4e390996
编写于
12月 20, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
12月 20, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9226 from taosdata/feature/dnode3
Feature/dnode3
上级
bddfff72
735d2279
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
27 addition
and
53 deletion
+27
-53
source/dnode/mgmt/daemon/src/daemon.c
source/dnode/mgmt/daemon/src/daemon.c
+1
-1
source/dnode/mnode/impl/src/mndAcct.c
source/dnode/mnode/impl/src/mndAcct.c
+7
-8
source/dnode/mnode/impl/src/mndCluster.c
source/dnode/mnode/impl/src/mndCluster.c
+7
-3
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+6
-3
source/dnode/mnode/impl/src/mndTrans.c
source/dnode/mnode/impl/src/mndTrans.c
+3
-3
source/dnode/mnode/impl/src/mndUser.c
source/dnode/mnode/impl/src/mndUser.c
+3
-3
tests/script/general/user/monitor.sim
tests/script/general/user/monitor.sim
+0
-32
未找到文件。
source/dnode/mgmt/daemon/src/daemon.c
浏览文件 @
4e390996
...
@@ -31,7 +31,7 @@ static struct {
...
@@ -31,7 +31,7 @@ static struct {
}
global
=
{
0
};
}
global
=
{
0
};
void
dmnSigintHandle
(
int
signum
,
void
*
info
,
void
*
ctx
)
{
void
dmnSigintHandle
(
int
signum
,
void
*
info
,
void
*
ctx
)
{
u
Error
(
"singal:%d is received"
,
signum
);
u
Info
(
"singal:%d is received"
,
signum
);
global
.
stop
=
true
;
global
.
stop
=
true
;
}
}
...
...
source/dnode/mnode/impl/src/mndAcct.c
浏览文件 @
4e390996
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
#include "mndAcct.h"
#include "mndAcct.h"
#include "mndShow.h"
#include "mndShow.h"
#define SDB_ACCT_VER 1
#define TSDB_ACCT_VER_NUMBER 1
#define TSDB_ACCT_RESERVE_SIZE 64
static
int32_t
mndCreateDefaultAcct
(
SMnode
*
pMnode
);
static
int32_t
mndCreateDefaultAcct
(
SMnode
*
pMnode
);
static
SSdbRaw
*
mndAcctActionEncode
(
SAcctObj
*
pAcct
);
static
SSdbRaw
*
mndAcctActionEncode
(
SAcctObj
*
pAcct
);
...
@@ -70,7 +71,7 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) {
...
@@ -70,7 +71,7 @@ static int32_t mndCreateDefaultAcct(SMnode *pMnode) {
}
}
static
SSdbRaw
*
mndAcctActionEncode
(
SAcctObj
*
pAcct
)
{
static
SSdbRaw
*
mndAcctActionEncode
(
SAcctObj
*
pAcct
)
{
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_ACCT
,
SDB_ACCT_V
ER
,
sizeof
(
SAcctObj
));
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_ACCT
,
TSDB_ACCT_VER_NUMB
ER
,
sizeof
(
SAcctObj
));
if
(
pRaw
==
NULL
)
return
NULL
;
if
(
pRaw
==
NULL
)
return
NULL
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -85,6 +86,7 @@ static SSdbRaw *mndAcctActionEncode(SAcctObj *pAcct) {
...
@@ -85,6 +86,7 @@ static SSdbRaw *mndAcctActionEncode(SAcctObj *pAcct) {
SDB_SET_INT32
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
maxStreams
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
maxStreams
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
maxStorage
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
maxStorage
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
accessState
)
SDB_SET_INT32
(
pRaw
,
dataPos
,
pAcct
->
cfg
.
accessState
)
SDB_SET_RESERVE
(
pRaw
,
dataPos
,
TSDB_ACCT_RESERVE_SIZE
)
SDB_SET_DATALEN
(
pRaw
,
dataPos
);
SDB_SET_DATALEN
(
pRaw
,
dataPos
);
return
pRaw
;
return
pRaw
;
...
@@ -94,7 +96,7 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
...
@@ -94,7 +96,7 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sver
!=
SDB_ACCT_V
ER
)
{
if
(
sver
!=
TSDB_ACCT_VER_NUMB
ER
)
{
mError
(
"failed to decode acct since %s"
,
terrstr
());
mError
(
"failed to decode acct since %s"
,
terrstr
());
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
return
NULL
;
return
NULL
;
...
@@ -116,13 +118,13 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
...
@@ -116,13 +118,13 @@ static SSdbRow *mndAcctActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
maxStreams
)
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
maxStreams
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
maxStorage
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
maxStorage
)
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
accessState
)
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pAcct
->
cfg
.
accessState
)
SDB_GET_RESERVE
(
pRaw
,
pRow
,
dataPos
,
TSDB_ACCT_RESERVE_SIZE
)
return
pRow
;
return
pRow
;
}
}
static
int32_t
mndAcctActionInsert
(
SSdb
*
pSdb
,
SAcctObj
*
pAcct
)
{
static
int32_t
mndAcctActionInsert
(
SSdb
*
pSdb
,
SAcctObj
*
pAcct
)
{
mTrace
(
"acct:%s, perform insert action"
,
pAcct
->
acct
);
mTrace
(
"acct:%s, perform insert action"
,
pAcct
->
acct
);
memset
(
&
pAcct
->
info
,
0
,
sizeof
(
SAcctInfo
));
return
0
;
return
0
;
}
}
...
@@ -134,12 +136,9 @@ static int32_t mndAcctActionDelete(SSdb *pSdb, SAcctObj *pAcct) {
...
@@ -134,12 +136,9 @@ static int32_t mndAcctActionDelete(SSdb *pSdb, SAcctObj *pAcct) {
static
int32_t
mndAcctActionUpdate
(
SSdb
*
pSdb
,
SAcctObj
*
pOldAcct
,
SAcctObj
*
pNewAcct
)
{
static
int32_t
mndAcctActionUpdate
(
SSdb
*
pSdb
,
SAcctObj
*
pOldAcct
,
SAcctObj
*
pNewAcct
)
{
mTrace
(
"acct:%s, perform update action"
,
pOldAcct
->
acct
);
mTrace
(
"acct:%s, perform update action"
,
pOldAcct
->
acct
);
memcpy
(
pOldAcct
->
acct
,
pNewAcct
->
acct
,
TSDB_USER_LEN
);
pOldAcct
->
createdTime
=
pNewAcct
->
createdTime
;
pOldAcct
->
updateTime
=
pNewAcct
->
updateTime
;
pOldAcct
->
updateTime
=
pNewAcct
->
updateTime
;
pOldAcct
->
acctId
=
pNewAcct
->
acctId
;
pOldAcct
->
status
=
pNewAcct
->
status
;
pOldAcct
->
status
=
pNewAcct
->
status
;
pOldAcct
->
cfg
=
pNewAcct
->
cfg
;
memcpy
(
&
pOldAcct
->
cfg
,
&
pNewAcct
->
cfg
,
sizeof
(
SAcctInfo
))
;
return
0
;
return
0
;
}
}
...
...
source/dnode/mnode/impl/src/mndCluster.c
浏览文件 @
4e390996
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
#include "mndShow.h"
#include "mndShow.h"
#include "mndTrans.h"
#include "mndTrans.h"
#define SDB_CLUSTER_VER 1
#define TSDB_CLUSTER_VER_NUMBE 1
#define TSDB_CLUSTER_RESERVE_SIZE 64
static
SSdbRaw
*
mndClusterActionEncode
(
SClusterObj
*
pCluster
);
static
SSdbRaw
*
mndClusterActionEncode
(
SClusterObj
*
pCluster
);
static
SSdbRow
*
mndClusterActionDecode
(
SSdbRaw
*
pRaw
);
static
SSdbRow
*
mndClusterActionDecode
(
SSdbRaw
*
pRaw
);
...
@@ -62,7 +63,7 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len) {
...
@@ -62,7 +63,7 @@ int32_t mndGetClusterName(SMnode *pMnode, char *clusterName, int32_t len) {
}
}
static
SSdbRaw
*
mndClusterActionEncode
(
SClusterObj
*
pCluster
)
{
static
SSdbRaw
*
mndClusterActionEncode
(
SClusterObj
*
pCluster
)
{
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_CLUSTER
,
SDB_CLUSTER_VER
,
sizeof
(
SClusterObj
));
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_CLUSTER
,
TSDB_CLUSTER_VER_NUMBE
,
sizeof
(
SClusterObj
));
if
(
pRaw
==
NULL
)
return
NULL
;
if
(
pRaw
==
NULL
)
return
NULL
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -70,6 +71,7 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) {
...
@@ -70,6 +71,7 @@ static SSdbRaw *mndClusterActionEncode(SClusterObj *pCluster) {
SDB_SET_INT64
(
pRaw
,
dataPos
,
pCluster
->
createdTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pCluster
->
createdTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pCluster
->
updateTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pCluster
->
updateTime
)
SDB_SET_BINARY
(
pRaw
,
dataPos
,
pCluster
->
name
,
TSDB_CLUSTER_ID_LEN
)
SDB_SET_BINARY
(
pRaw
,
dataPos
,
pCluster
->
name
,
TSDB_CLUSTER_ID_LEN
)
SDB_SET_RESERVE
(
pRaw
,
dataPos
,
TSDB_CLUSTER_RESERVE_SIZE
)
return
pRaw
;
return
pRaw
;
}
}
...
@@ -78,7 +80,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
...
@@ -78,7 +80,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sver
!=
SDB_CLUSTER_VER
)
{
if
(
sver
!=
TSDB_CLUSTER_VER_NUMBE
)
{
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
mError
(
"failed to decode cluster since %s"
,
terrstr
());
mError
(
"failed to decode cluster since %s"
,
terrstr
());
return
NULL
;
return
NULL
;
...
@@ -93,6 +95,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
...
@@ -93,6 +95,7 @@ static SSdbRow *mndClusterActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pCluster
->
createdTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pCluster
->
createdTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pCluster
->
updateTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pCluster
->
updateTime
)
SDB_GET_BINARY
(
pRaw
,
pRow
,
dataPos
,
pCluster
->
name
,
TSDB_CLUSTER_ID_LEN
)
SDB_GET_BINARY
(
pRaw
,
pRow
,
dataPos
,
pCluster
->
name
,
TSDB_CLUSTER_ID_LEN
)
SDB_GET_RESERVE
(
pRaw
,
pRow
,
dataPos
,
TSDB_CLUSTER_RESERVE_SIZE
)
return
pRow
;
return
pRow
;
}
}
...
@@ -169,6 +172,7 @@ static int32_t mndGetClusterMeta(SMnodeMsg *pMsg, SShowObj *pShow, STableMetaMsg
...
@@ -169,6 +172,7 @@ static int32_t mndGetClusterMeta(SMnodeMsg *pMsg, SShowObj *pShow, STableMetaMsg
pShow
->
numOfRows
=
1
;
pShow
->
numOfRows
=
1
;
pShow
->
rowSize
=
pShow
->
offset
[
cols
-
1
]
+
pShow
->
bytes
[
cols
-
1
];
pShow
->
rowSize
=
pShow
->
offset
[
cols
-
1
]
+
pShow
->
bytes
[
cols
-
1
];
strcpy
(
pMeta
->
tbFname
,
mndShowStr
(
pShow
->
type
));
return
0
;
return
0
;
}
}
...
...
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
4e390996
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
#include "mndShow.h"
#include "mndShow.h"
#include "mndTrans.h"
#include "mndTrans.h"
#define SDB_MNODE_VER 1
#define TSDB_MNODE_VER_NUMBER 1
#define TSDB_MNODE_RESERVE_SIZE 64
static
int32_t
mndCreateDefaultMnode
(
SMnode
*
pMnode
);
static
int32_t
mndCreateDefaultMnode
(
SMnode
*
pMnode
);
static
SSdbRaw
*
mndMnodeActionEncode
(
SMnodeObj
*
pMnodeObj
);
static
SSdbRaw
*
mndMnodeActionEncode
(
SMnodeObj
*
pMnodeObj
);
...
@@ -97,13 +98,14 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) {
...
@@ -97,13 +98,14 @@ static int32_t mndCreateDefaultMnode(SMnode *pMnode) {
}
}
static
SSdbRaw
*
mndMnodeActionEncode
(
SMnodeObj
*
pMnodeObj
)
{
static
SSdbRaw
*
mndMnodeActionEncode
(
SMnodeObj
*
pMnodeObj
)
{
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_MNODE
,
SDB_MNODE_V
ER
,
sizeof
(
SMnodeObj
));
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_MNODE
,
TSDB_MNODE_VER_NUMB
ER
,
sizeof
(
SMnodeObj
));
if
(
pRaw
==
NULL
)
return
NULL
;
if
(
pRaw
==
NULL
)
return
NULL
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
SDB_SET_INT32
(
pRaw
,
dataPos
,
pMnodeObj
->
id
);
SDB_SET_INT32
(
pRaw
,
dataPos
,
pMnodeObj
->
id
);
SDB_SET_INT64
(
pRaw
,
dataPos
,
pMnodeObj
->
createdTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pMnodeObj
->
createdTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pMnodeObj
->
updateTime
)
SDB_SET_INT64
(
pRaw
,
dataPos
,
pMnodeObj
->
updateTime
)
SDB_SET_RESERVE
(
pRaw
,
dataPos
,
TSDB_MNODE_RESERVE_SIZE
)
return
pRaw
;
return
pRaw
;
}
}
...
@@ -112,7 +114,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -112,7 +114,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sver
!=
SDB_MNODE_V
ER
)
{
if
(
sver
!=
TSDB_MNODE_VER_NUMB
ER
)
{
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
mError
(
"failed to decode mnode since %s"
,
terrstr
());
mError
(
"failed to decode mnode since %s"
,
terrstr
());
return
NULL
;
return
NULL
;
...
@@ -126,6 +128,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
...
@@ -126,6 +128,7 @@ static SSdbRow *mndMnodeActionDecode(SSdbRaw *pRaw) {
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
id
)
SDB_GET_INT32
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
id
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
createdTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
createdTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
updateTime
)
SDB_GET_INT64
(
pRaw
,
pRow
,
dataPos
,
&
pMnodeObj
->
updateTime
)
SDB_GET_RESERVE
(
pRaw
,
pRow
,
dataPos
,
TSDB_MNODE_RESERVE_SIZE
)
return
pRow
;
return
pRow
;
}
}
...
...
source/dnode/mnode/impl/src/mndTrans.c
浏览文件 @
4e390996
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "mndTrans.h"
#include "mndTrans.h"
#include "mndSync.h"
#include "mndSync.h"
#define TSDB_TRANS_VER 1
#define TSDB_TRANS_VER
_NUMBER
1
#define TSDB_TRN_ARRAY_SIZE 8
#define TSDB_TRN_ARRAY_SIZE 8
#define TSDB_TRN_RESERVE_SIZE 64
#define TSDB_TRN_RESERVE_SIZE 64
...
@@ -93,7 +93,7 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) {
...
@@ -93,7 +93,7 @@ static SSdbRaw *mndTransActionEncode(STrans *pTrans) {
rawDataLen
+=
(
sizeof
(
STransAction
)
+
pAction
->
contLen
);
rawDataLen
+=
(
sizeof
(
STransAction
)
+
pAction
->
contLen
);
}
}
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_TRANS
,
TSDB_TRANS_VER
,
rawDataLen
);
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_TRANS
,
TSDB_TRANS_VER
_NUMBER
,
rawDataLen
);
if
(
pRaw
==
NULL
)
{
if
(
pRaw
==
NULL
)
{
mError
(
"trans:%d, failed to alloc raw since %s"
,
pTrans
->
id
,
terrstr
());
mError
(
"trans:%d, failed to alloc raw since %s"
,
pTrans
->
id
,
terrstr
());
return
NULL
;
return
NULL
;
...
@@ -160,7 +160,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
...
@@ -160,7 +160,7 @@ static SSdbRow *mndTransActionDecode(SSdbRaw *pRaw) {
return
NULL
;
return
NULL
;
}
}
if
(
sver
!=
TSDB_TRANS_VER
)
{
if
(
sver
!=
TSDB_TRANS_VER
_NUMBER
)
{
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
mError
(
"failed to get check soft ver from raw:%p since %s"
,
pRaw
,
terrstr
());
mError
(
"failed to get check soft ver from raw:%p since %s"
,
pRaw
,
terrstr
());
return
NULL
;
return
NULL
;
...
...
source/dnode/mnode/impl/src/mndUser.c
浏览文件 @
4e390996
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
#include "mndTrans.h"
#include "mndTrans.h"
#include "tkey.h"
#include "tkey.h"
#define TSDB_USER_VER 1
#define TSDB_USER_VER
_NUMBER
1
#define TSDB_USER_RESERVE_SIZE 64
#define TSDB_USER_RESERVE_SIZE 64
static
int32_t
mndCreateDefaultUsers
(
SMnode
*
pMnode
);
static
int32_t
mndCreateDefaultUsers
(
SMnode
*
pMnode
);
...
@@ -94,7 +94,7 @@ static int32_t mndCreateDefaultUsers(SMnode *pMnode) {
...
@@ -94,7 +94,7 @@ static int32_t mndCreateDefaultUsers(SMnode *pMnode) {
}
}
static
SSdbRaw
*
mndUserActionEncode
(
SUserObj
*
pUser
)
{
static
SSdbRaw
*
mndUserActionEncode
(
SUserObj
*
pUser
)
{
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_USER
,
TSDB_USER_VER
,
sizeof
(
SUserObj
)
+
TSDB_USER_RESERVE_SIZE
);
SSdbRaw
*
pRaw
=
sdbAllocRaw
(
SDB_USER
,
TSDB_USER_VER
_NUMBER
,
sizeof
(
SUserObj
)
+
TSDB_USER_RESERVE_SIZE
);
if
(
pRaw
==
NULL
)
return
NULL
;
if
(
pRaw
==
NULL
)
return
NULL
;
int32_t
dataPos
=
0
;
int32_t
dataPos
=
0
;
...
@@ -114,7 +114,7 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
...
@@ -114,7 +114,7 @@ static SSdbRow *mndUserActionDecode(SSdbRaw *pRaw) {
int8_t
sver
=
0
;
int8_t
sver
=
0
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sdbGetRawSoftVer
(
pRaw
,
&
sver
)
!=
0
)
return
NULL
;
if
(
sver
!=
TSDB_USER_VER
)
{
if
(
sver
!=
TSDB_USER_VER
_NUMBER
)
{
mError
(
"failed to decode user since %s"
,
terrstr
());
mError
(
"failed to decode user since %s"
,
terrstr
());
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
terrno
=
TSDB_CODE_SDB_INVALID_DATA_VER
;
return
NULL
;
return
NULL
;
...
...
tests/script/general/user/monitor.sim
已删除
100644 → 0
浏览文件 @
bddfff72
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
print ========== step1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c monitor -v 1
system sh/cfg.sh -n dnode1 -c monitorInterval -v 1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ========== step2
#sql drop database log -x step21
# return -1
#step21:
sql drop table log.dn -x step22
# return -1
step22:
sql drop user log -x step23
# return -1
step23:
print ========== step3
sleep 2000
#sql select * from log.dn
#if $rows == 0 then
# return -1
#endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录