Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c8b3ad28
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
c8b3ad28
编写于
10月 17, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
ef3e39c9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
27 deletion
+3
-27
source/server/mnode/inc/mnodeDef.h
source/server/mnode/inc/mnodeDef.h
+2
-16
source/server/mnode/src/mnodeAcct.c
source/server/mnode/src/mnodeAcct.c
+1
-11
未找到文件。
source/server/mnode/inc/mnodeDef.h
浏览文件 @
c8b3ad28
...
...
@@ -143,32 +143,18 @@ typedef struct {
int32_t
maxUsers
;
int32_t
maxDbs
;
int32_t
maxTimeSeries
;
int32_t
maxConnections
;
int32_t
maxStreams
;
int32_t
maxPointsPerSecond
;
int64_t
maxStorage
;
// In unit of GB
int64_t
maxQueryTime
;
// In unit of hour
int64_t
maxInbound
;
int64_t
maxOutbound
;
int8_t
accessState
;
// Configured only by command
}
SAcctCfg
;
typedef
struct
{
int64_t
totalStorage
;
// Total storage wrtten from this account
int64_t
compStorage
;
// Compressed storage on disk
int64_t
queryTime
;
int64_t
totalPoints
;
int64_t
inblound
;
int64_t
outbound
;
int64_t
sKey
;
int32_t
numOfUsers
;
int32_t
numOfDbs
;
int32_t
numOfTimeSeries
;
int32_t
numOfPointsPerSecond
;
int32_t
numOfConns
;
int32_t
numOfQueries
;
int32_t
numOfStreams
;
int8_t
accessState
;
// Checked by mgmt heartbeat message
int64_t
totalStorage
;
// Total storage wrtten from this account
int64_t
compStorage
;
// Compressed storage on disk
}
SAcctInfo
;
typedef
struct
SAcctObj
{
...
...
source/server/mnode/src/mnodeAcct.c
浏览文件 @
c8b3ad28
...
...
@@ -25,13 +25,8 @@ static void mnodeCreateDefaultAcct() {
acctObj
.
cfg
=
(
SAcctCfg
){.
maxUsers
=
128
,
.
maxDbs
=
128
,
.
maxTimeSeries
=
INT32_MAX
,
.
maxConnections
=
1024
,
.
maxStreams
=
1000
,
.
maxPointsPerSecond
=
10000000
,
.
maxStorage
=
INT64_MAX
,
.
maxQueryTime
=
INT64_MAX
,
.
maxInbound
=
0
,
.
maxOutbound
=
0
,
.
accessState
=
TSDB_VN_ALL_ACCCESS
};
acctObj
.
acctId
=
1
;
acctObj
.
createdTime
=
taosGetTimestampMs
();
...
...
@@ -47,13 +42,8 @@ int32_t mnodeEncodeAcct(SAcctObj *pAcct, char *buf, int32_t maxLen) {
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxUsers
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxUsers
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxDbs
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxDbs
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxTimeSeries
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxTimeSeries
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxConnections
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxConnections
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxStreams
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxStreams
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxPointsPerSecond
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
maxPointsPerSecond
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxUsers
\"
:
\"
%"
PRIu64
"
\"
, "
,
pAcct
->
cfg
.
maxStorage
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxQueryTime
\"
:
\"
%"
PRIu64
"
\"
, "
,
pAcct
->
cfg
.
maxQueryTime
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxInbound
\"\"
:%"
PRIu64
"
\"
, "
,
pAcct
->
cfg
.
maxInbound
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxOutbound
\"
:
\"
%"
PRIu64
"
\"
, "
,
pAcct
->
cfg
.
maxOutbound
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
maxStorage
\"
:
\"
%"
PRIu64
"
\"
, "
,
pAcct
->
cfg
.
maxStorage
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
accessState
\"
:
\"
%d
\"
, "
,
pAcct
->
cfg
.
accessState
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
createdTime
\"
:
\"
%"
PRIu64
"
\"
, "
,
pAcct
->
createdTime
);
len
+=
snprintf
(
buf
+
len
,
maxLen
-
len
,
"
\"
updateTime
\"
:
\"
%"
PRIu64
"
\"
}
\n
"
,
pAcct
->
updateTime
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录