feat: support uniq grant
This commit is contained in:
parent
18ece50f86
commit
f50867831b
|
@ -58,6 +58,9 @@ typedef enum {
|
||||||
|
|
||||||
int32_t grantCheck(EGrantType grant);
|
int32_t grantCheck(EGrantType grant);
|
||||||
char* tGetMachineId();
|
char* tGetMachineId();
|
||||||
|
#ifndef TD_UNIQ_GRANT
|
||||||
|
int32_t grantAlterActiveCode(int32_t did, const char* old, const char* newer, char* out, int8_t type);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef GRANTS_CFG
|
#ifndef GRANTS_CFG
|
||||||
#ifdef TD_ENTERPRISE
|
#ifdef TD_ENTERPRISE
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include "mndInt.h"
|
#include "mndInt.h"
|
||||||
|
|
||||||
int32_t mndInitGrant(SMnode * pMnode);
|
int32_t mndInitGrant(SMnode * pMnode);
|
||||||
void mndCleanupGrant(SMnode * pMnode);
|
void mndCleanupGrant();
|
||||||
void grantParseParameter();
|
void grantParseParameter();
|
||||||
void grantReset(SMnode * pMnode, EGrantType grant, uint64_t value);
|
void grantReset(SMnode * pMnode, EGrantType grant, uint64_t value);
|
||||||
void grantAdd(EGrantType grant, uint64_t value);
|
void grantAdd(EGrantType grant, uint64_t value);
|
||||||
|
@ -36,8 +36,10 @@
|
||||||
int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant);
|
int32_t mndGrantActionDelete(SSdb * pSdb, SGrantLogObj * pGrant);
|
||||||
int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant);
|
int32_t mndGrantActionUpdate(SSdb * pSdb, SGrantLogObj * pOldGrant, SGrantLogObj * pNewGrant);
|
||||||
|
|
||||||
|
#ifdef TD_UNIQ_GRANT
|
||||||
int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive,
|
int32_t grantAlterActiveCode(SMnode * pMnode, SGrantLogObj * pObj, const char *oldActive, const char *newActive,
|
||||||
char **mergeActive);
|
char **mergeActive);
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg);
|
int32_t mndProcessConfigGrantReq(SMnode * pMnode, SRpcMsg * pReq, SMCfgClusterReq * pCfg);
|
||||||
int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState);
|
int32_t mndProcessUpdGrantLog(SMnode * pMnode, SRpcMsg * pReq, SArray * pMachines, SGrantState * pState);
|
||||||
|
|
|
@ -70,7 +70,7 @@ int32_t mndInitGrant(SMnode *pMnode) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mndCleanupGrant(SMnode *pMnode) {}
|
void mndCleanupGrant() {}
|
||||||
void grantParseParameter() { mError("can't parsed parameter k"); }
|
void grantParseParameter() { mError("can't parsed parameter k"); }
|
||||||
void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {}
|
void grantReset(SMnode *pMnode, EGrantType grant, uint64_t value) {}
|
||||||
void grantAdd(EGrantType grant, uint64_t value) {}
|
void grantAdd(EGrantType grant, uint64_t value) {}
|
||||||
|
|
Loading…
Reference in New Issue