Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cfd3e514
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看板
提交
cfd3e514
编写于
3月 03, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
compile for mgmt grant
上级
8fc096e3
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
26 addition
and
13 deletion
+26
-13
src/dnode/inc/dnodeSystem.h
src/dnode/inc/dnodeSystem.h
+0
-1
src/dnode/src/dnodeService.c
src/dnode/src/dnodeService.c
+5
-1
src/dnode/src/dnodeSystem.c
src/dnode/src/dnodeSystem.c
+0
-4
src/inc/dnode.h
src/inc/dnode.h
+0
-1
src/mnode/inc/mgmtGrant.h
src/mnode/inc/mgmtGrant.h
+3
-1
src/mnode/src/mgmtChildTable.c
src/mnode/src/mgmtChildTable.c
+1
-1
src/mnode/src/mgmtDnodeInt.c
src/mnode/src/mgmtDnodeInt.c
+11
-2
src/mnode/src/mgmtGrant.c
src/mnode/src/mgmtGrant.c
+6
-2
未找到文件。
src/dnode/inc/dnodeSystem.h
浏览文件 @
cfd3e514
...
@@ -33,7 +33,6 @@ extern int32_t (*dnodeInitPeers)(int32_t numOfThreads);
...
@@ -33,7 +33,6 @@ extern int32_t (*dnodeInitPeers)(int32_t numOfThreads);
extern
int32_t
(
*
dnodeCheckSystem
)();
extern
int32_t
(
*
dnodeCheckSystem
)();
extern
int32_t
(
*
dnodeInitStorage
)();
extern
int32_t
(
*
dnodeInitStorage
)();
extern
void
(
*
dnodeCleanupStorage
)();
extern
void
(
*
dnodeCleanupStorage
)();
extern
void
(
*
dnodeParseParameterK
)();
extern
int32_t
tsMaxQueues
;
extern
int32_t
tsMaxQueues
;
extern
void
**
tsRpcQhandle
;
extern
void
**
tsRpcQhandle
;
extern
void
*
tsQueryQhandle
;
extern
void
*
tsQueryQhandle
;
...
...
src/dnode/src/dnodeService.c
浏览文件 @
cfd3e514
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
#include "tglobalcfg.h"
#include "tglobalcfg.h"
#include "dnodeSystem.h"
#include "dnodeSystem.h"
void
(
*
dnodeParseParameterKFp
)()
=
NULL
;
/*
/*
* Termination handler
* Termination handler
*/
*/
...
@@ -63,7 +65,9 @@ int main(int argc, char *argv[]) {
...
@@ -63,7 +65,9 @@ int main(int argc, char *argv[]) {
printf
(
"buildinfo: %s
\n
"
,
buildinfo
);
printf
(
"buildinfo: %s
\n
"
,
buildinfo
);
return
0
;
return
0
;
}
else
if
(
strcmp
(
argv
[
i
],
"-k"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-k"
)
==
0
)
{
dnodeParseParameterK
();
if
(
dnodeParseParameterKFp
)
{
dnodeParseParameterKFp
();
}
#ifdef TAOS_MEM_CHECK
#ifdef TAOS_MEM_CHECK
}
else
if
(
strcmp
(
argv
[
i
],
"--alloc-random-fail"
)
==
0
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"--alloc-random-fail"
)
==
0
)
{
if
((
i
<
argc
-
1
)
&&
(
argv
[
i
+
1
][
0
]
!=
'-'
))
{
if
((
i
<
argc
-
1
)
&&
(
argv
[
i
+
1
][
0
]
!=
'-'
))
{
...
...
src/dnode/src/dnodeSystem.c
浏览文件 @
cfd3e514
...
@@ -294,10 +294,6 @@ int32_t dnodeCheckSystemImp() {
...
@@ -294,10 +294,6 @@ int32_t dnodeCheckSystemImp() {
int32_t
(
*
dnodeCheckSystem
)()
=
dnodeCheckSystemImp
;
int32_t
(
*
dnodeCheckSystem
)()
=
dnodeCheckSystemImp
;
void
dnodeParseParameterKImp
()
{}
void
(
*
dnodeParseParameterK
)()
=
dnodeParseParameterKImp
;
int32_t
dnodeInitPeersImp
(
int32_t
numOfThreads
)
{
int32_t
dnodeInitPeersImp
(
int32_t
numOfThreads
)
{
return
0
;
return
0
;
}
}
...
...
src/inc/dnode.h
浏览文件 @
cfd3e514
...
@@ -42,7 +42,6 @@ extern uint32_t tsRebootTime;
...
@@ -42,7 +42,6 @@ extern uint32_t tsRebootTime;
// dnodeCluster
// dnodeCluster
extern
void
(
*
dnodeStartModules
)();
extern
void
(
*
dnodeStartModules
)();
extern
void
(
*
dnodeParseParameterK
)();
extern
int32_t
(
*
dnodeCheckSystem
)();
extern
int32_t
(
*
dnodeCheckSystem
)();
...
...
src/mnode/inc/mgmtGrant.h
浏览文件 @
cfd3e514
...
@@ -31,7 +31,9 @@ int32_t mgmtCheckTimeSeries(uint32_t timeseries);
...
@@ -31,7 +31,9 @@ int32_t mgmtCheckTimeSeries(uint32_t timeseries);
int32_t
mgmtCheckUserGrant
();
int32_t
mgmtCheckUserGrant
();
int32_t
mgmtCheckDbGrant
();
int32_t
mgmtCheckDbGrant
();
int32_t
mgmtGetGrantsMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
);
int32_t
mgmtGetGrantsMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
);
int32_t
mgmtRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
void
*
pConn
);
int32_t
mgmtRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int32_t
rows
,
void
*
pConn
);
extern
void
(
*
mgmtUpdateGrantInfoFp
)(
void
*
pCont
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/mnode/src/mgmtChildTable.c
浏览文件 @
cfd3e514
...
@@ -442,7 +442,7 @@ int32_t mgmtModifyChildTableTagValueByName(SChildTableObj *pTable, char *tagName
...
@@ -442,7 +442,7 @@ int32_t mgmtModifyChildTableTagValueByName(SChildTableObj *pTable, char *tagName
//
//
// mgmtMeterActionEncode(pTable, msg, size, &rowSize);
// mgmtMeterActionEncode(pTable, msg, size, &rowSize);
//
//
// int32_t ret = sdbUpdateRow(
meter
Sdb, msg, rowSize, 1); // Need callback function
// int32_t ret = sdbUpdateRow(
tsChildTable
Sdb, msg, rowSize, 1); // Need callback function
// tfree(msg);
// tfree(msg);
//
//
// if (pTable->isDirty) pTable->isDirty = 0;
// if (pTable->isDirty) pTable->isDirty = 0;
...
...
src/mnode/src/mgmtDnodeInt.c
浏览文件 @
cfd3e514
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "mgmtDb.h"
#include "mgmtDb.h"
#include "mgmtDnode.h"
#include "mgmtDnode.h"
#include "mgmtDnodeInt.h"
#include "mgmtDnodeInt.h"
#include "mgmtGrant.h"
#include "mgmtProfile.h"
#include "mgmtProfile.h"
#include "mgmtShell.h"
#include "mgmtShell.h"
#include "mgmtTable.h"
#include "mgmtTable.h"
...
@@ -230,6 +231,14 @@ void mgmtSendCreateVnodeMsg(SVgObj *pVgroup, int32_t vnode, SRpcIpSet *ipSet, vo
...
@@ -230,6 +231,14 @@ void mgmtSendCreateVnodeMsg(SVgObj *pVgroup, int32_t vnode, SRpcIpSet *ipSet, vo
}
}
}
}
static
void
mgmtProcessDnodeGrantMsg
(
void
*
pCont
,
void
*
thandle
)
{
if
(
mgmtUpdateGrantInfoFp
)
{
mgmtUpdateGrantInfoFp
(
pCont
);
mTrace
(
"grant info is updated"
);
}
rpcSendResponse
(
thandle
,
TSDB_CODE_SUCCESS
,
NULL
,
0
);
}
void
mgmtProcessMsgFromDnode
(
char
msgType
,
void
*
pCont
,
int32_t
contLen
,
void
*
pConn
,
int32_t
code
)
{
void
mgmtProcessMsgFromDnode
(
char
msgType
,
void
*
pCont
,
int32_t
contLen
,
void
*
pConn
,
int32_t
code
)
{
if
(
msgType
<
0
||
msgType
>=
TSDB_MSG_TYPE_MAX
)
{
if
(
msgType
<
0
||
msgType
>=
TSDB_MSG_TYPE_MAX
)
{
mError
(
"invalid msg type:%d"
,
msgType
);
mError
(
"invalid msg type:%d"
,
msgType
);
...
@@ -255,9 +264,9 @@ void mgmtProcessMsgFromDnode(char msgType, void *pCont, int32_t contLen, void *p
...
@@ -255,9 +264,9 @@ void mgmtProcessMsgFromDnode(char msgType, void *pCont, int32_t contLen, void *p
}
else
if
(
msgType
==
TSDB_MSG_TYPE_DNODE_CFG_RSP
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_DNODE_CFG_RSP
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_ALTER_STREAM_RSP
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_ALTER_STREAM_RSP
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_STATUS
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_STATUS
)
{
mgmtProcessDnodeStatus
(
msgType
,
pCon
n
,
contLen
,
pConn
,
code
);
mgmtProcessDnodeStatus
(
msgType
,
pCon
t
,
contLen
,
pConn
,
code
);
}
else
if
(
msgType
==
TSDB_MSG_TYPE_GRANT
)
{
}
else
if
(
msgType
==
TSDB_MSG_TYPE_GRANT
)
{
mgmtProcessD
ropStableRsp
(
msgType
,
pCont
,
contLen
,
pConn
,
code
);
mgmtProcessD
nodeGrantMsg
(
pCont
,
pConn
);
}
else
{
}
else
{
mError
(
"%s from dnode is not processed"
,
taosMsg
[(
int8_t
)
msgType
]);
mError
(
"%s from dnode is not processed"
,
taosMsg
[(
int8_t
)
msgType
]);
}
}
...
...
src/mnode/src/mgmtGrant.c
浏览文件 @
cfd3e514
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include "mnode.h"
#include "mnode.h"
#include "mgmtAcct.h"
#include "mgmtAcct.h"
#include "mgmtGrant.h"
#include "mgmtGrant.h"
#include "mgmtUser.h"
int32_t
(
*
mgmtCheckUserGrantFp
)()
=
NULL
;
int32_t
(
*
mgmtCheckUserGrantFp
)()
=
NULL
;
int32_t
(
*
mgmtCheckDbGrantFp
)()
=
NULL
;
int32_t
(
*
mgmtCheckDbGrantFp
)()
=
NULL
;
...
@@ -27,6 +28,7 @@ int32_t (*mgmtCheckTimeSeriesFp)(uint32_t timeseries) = NULL;
...
@@ -27,6 +28,7 @@ int32_t (*mgmtCheckTimeSeriesFp)(uint32_t timeseries) = NULL;
bool
(
*
mgmtCheckExpiredFp
)()
=
NULL
;
bool
(
*
mgmtCheckExpiredFp
)()
=
NULL
;
int32_t
(
*
mgmtGetGrantsMetaFp
)(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
)
=
NULL
;
int32_t
(
*
mgmtGetGrantsMetaFp
)(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
)
=
NULL
;
int32_t
(
*
mgmtRetrieveGrantsFp
)(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
void
*
pConn
)
=
NULL
;
int32_t
(
*
mgmtRetrieveGrantsFp
)(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
void
*
pConn
)
=
NULL
;
void
(
*
mgmtUpdateGrantInfoFp
)(
void
*
pCont
)
=
NULL
;
int32_t
mgmtCheckUserGrant
()
{
int32_t
mgmtCheckUserGrant
()
{
if
(
mgmtCheckUserGrantFp
)
{
if
(
mgmtCheckUserGrantFp
)
{
...
@@ -76,17 +78,19 @@ bool mgmtCheckExpired() {
...
@@ -76,17 +78,19 @@ bool mgmtCheckExpired() {
int32_t
mgmtGetGrantsMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
)
{
int32_t
mgmtGetGrantsMeta
(
STableMeta
*
pMeta
,
SShowObj
*
pShow
,
void
*
pConn
)
{
if
(
mgmtGetGrantsMetaFp
)
{
if
(
mgmtGetGrantsMetaFp
)
{
SUserObj
*
pUser
=
mgmtGetUserFromConn
(
pConn
);
if
(
pUser
==
NULL
)
return
0
;
if
(
strcmp
(
pUser
->
user
,
"root"
)
!=
0
)
return
TSDB_CODE_NO_RIGHTS
;
return
mgmtGetGrantsMetaFp
(
pMeta
,
pShow
,
pConn
);
return
mgmtGetGrantsMetaFp
(
pMeta
,
pShow
,
pConn
);
}
else
{
}
else
{
return
TSDB_CODE_OPS_NOT_SUPPORT
;
return
TSDB_CODE_OPS_NOT_SUPPORT
;
}
}
}
}
int32_t
mgmtRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int
rows
,
void
*
pConn
)
{
int32_t
mgmtRetrieveGrants
(
SShowObj
*
pShow
,
char
*
data
,
int
32_t
rows
,
void
*
pConn
)
{
if
(
mgmtRetrieveGrantsFp
)
{
if
(
mgmtRetrieveGrantsFp
)
{
return
mgmtRetrieveGrantsFp
(
pShow
,
data
,
rows
,
pConn
);
return
mgmtRetrieveGrantsFp
(
pShow
,
data
,
rows
,
pConn
);
}
else
{
}
else
{
return
0
;
return
0
;
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录