feat: support uniq grant

This commit is contained in:
kailixu 2024-01-19 17:01:19 +08:00
parent 5d6703c3ef
commit b7ea583f3a
3 changed files with 4 additions and 1 deletions

View File

@ -566,6 +566,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_GRANT_PAR_IVLD_DIST TAOS_DEF_ERROR_CODE(0, 0x0815)
#define TSDB_CODE_GRANT_UNLICENSED_CLUSTER TAOS_DEF_ERROR_CODE(0, 0x0816)
#define TSDB_CODE_GRANT_LACK_OF_BASIC TAOS_DEF_ERROR_CODE(0, 0x0817)
#define TSDB_CODE_GRANT_OBJ_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0818)
// sync
// #define TSDB_CODE_SYN_INVALID_CONFIG TAOS_DEF_ERROR_CODE(0, 0x0900) // 2.x

View File

@ -831,7 +831,7 @@ typedef struct {
int8_t nActives;
int64_t createTime;
int64_t updateTime;
SGrantState stats[GRANT_STATE_NUM];
SGrantState states[GRANT_STATE_NUM];
SGrantActive actives[GRANT_ACTIVE_NUM];
char* active;
SArray* pMachines; // SGrantMachines

View File

@ -41,6 +41,8 @@
int32_t mndProcessConfigGrantReq(SRpcMsg * pReq, SMCfgClusterReq * pCfg);
int32_t mndProcessUpdMachineReq(SRpcMsg * pReq, SArray *pMachines);
int32_t mndProcessUpdStateReq(SRpcMsg * pReq, SGrantState *pState);
int32_t mndGrantGetLastState(SMnode * pMnode, SGrantState * pState);
#endif
#ifdef __cplusplus