more code
This commit is contained in:
parent
318ac32ca2
commit
0f1692b63f
|
@ -845,6 +845,7 @@ __async_send_cb_fn_t getMsgRspHandle(int32_t msgType) {
|
||||||
case TDMT_MND_SHOW_VARIABLES:
|
case TDMT_MND_SHOW_VARIABLES:
|
||||||
return processShowVariablesRsp;
|
return processShowVariablesRsp;
|
||||||
case TDMT_MND_COMPACT_DB:
|
case TDMT_MND_COMPACT_DB:
|
||||||
|
case TDMT_MND_COMPACT_VGROUPS:
|
||||||
return processCompactDbRsp;
|
return processCompactDbRsp;
|
||||||
default:
|
default:
|
||||||
return genericRspCallback;
|
return genericRspCallback;
|
||||||
|
|
|
@ -149,6 +149,7 @@ SArray *mmGetMsgHandles() {
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_USE_DB, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_USE_DB, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_ALTER_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_ALTER_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||||
|
if (dmSetMgmtHandle(pArray, TDMT_MND_COMPACT_VGROUPS, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_TRIM_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_TRIM_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_S3MIGRATE_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_S3MIGRATE_DB, mmPutMsgToWriteQueue, 0) == NULL) goto _OVER;
|
||||||
if (dmSetMgmtHandle(pArray, TDMT_MND_GET_DB_CFG, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
|
if (dmSetMgmtHandle(pArray, TDMT_MND_GET_DB_CFG, mmPutMsgToReadQueue, 0) == NULL) goto _OVER;
|
||||||
|
|
|
@ -37,6 +37,7 @@ const char *mndGetDbStr(const char *src);
|
||||||
const char *mndGetStableStr(const char *src);
|
const char *mndGetStableStr(const char *src);
|
||||||
|
|
||||||
int32_t mndProcessCompactDbReq(SRpcMsg *pReq);
|
int32_t mndProcessCompactDbReq(SRpcMsg *pReq);
|
||||||
|
int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq);
|
||||||
int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList);
|
int32_t mndCheckDbDnodeList(SMnode *pMnode, char *db, char *dnodeListStr, SArray *dnodeList);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -457,7 +457,7 @@ int32_t mndProcessConfigClusterReq(SRpcMsg *pReq) {
|
||||||
_exit:
|
_exit:
|
||||||
tFreeSMCfgClusterReq(&cfgReq);
|
tFreeSMCfgClusterReq(&cfgReq);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, terrstr());
|
mError("cluster: failed to config:%s %s since %s", cfgReq.config, cfgReq.value, tstrerror(code));
|
||||||
} else {
|
} else {
|
||||||
mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value);
|
mInfo("cluster: success to config:%s %s", cfgReq.config, cfgReq.value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ static int32_t mndProcessGetDbCfgReq(SRpcMsg *pReq);
|
||||||
|
|
||||||
#ifndef TD_ENTERPRISE
|
#ifndef TD_ENTERPRISE
|
||||||
int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; }
|
int32_t mndProcessCompactDbReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; }
|
||||||
|
int32_t mndProcessCompactVgroupsReq(SRpcMsg *pReq) { return TSDB_CODE_OPS_NOT_SUPPORT; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t mndInitDb(SMnode *pMnode) {
|
int32_t mndInitDb(SMnode *pMnode) {
|
||||||
|
@ -76,6 +77,7 @@ int32_t mndInitDb(SMnode *pMnode) {
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_DROP_DB, mndProcessDropDbReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_DROP_DB, mndProcessDropDbReq);
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_USE_DB, mndProcessUseDbReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_USE_DB, mndProcessUseDbReq);
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_DB, mndProcessCompactDbReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_DB, mndProcessCompactDbReq);
|
||||||
|
mndSetMsgHandle(pMnode, TDMT_MND_COMPACT_VGROUPS, mndProcessCompactVgroupsReq);
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB, mndProcessTrimDbReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_TRIM_DB, mndProcessTrimDbReq);
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_GET_DB_CFG, mndProcessGetDbCfgReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_GET_DB_CFG, mndProcessGetDbCfgReq);
|
||||||
mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB, mndProcessS3MigrateDbReq);
|
mndSetMsgHandle(pMnode, TDMT_MND_S3MIGRATE_DB, mndProcessS3MigrateDbReq);
|
||||||
|
|
|
@ -859,9 +859,7 @@ static int32_t collectMetaKeyFromCompactDatabase(SCollectMetaKeyCxt* pCxt, SComp
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t collectMetaKeyFromCompactVgroups(SCollectMetaKeyCxt* pCxt, SCompactVgroupsStmt* pStmt) {
|
static int32_t collectMetaKeyFromCompactVgroups(SCollectMetaKeyCxt* pCxt, SCompactVgroupsStmt* pStmt) {
|
||||||
// TODO
|
return reserveDbCfgInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache);
|
||||||
return 0;
|
|
||||||
// return reserveDbCfgInCache(pCxt->pParseCxt->acctId, pStmt->dbName, pCxt->pMetaCache);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t collectMetaKeyFromGrant(SCollectMetaKeyCxt* pCxt, SGrantStmt* pStmt) {
|
static int32_t collectMetaKeyFromGrant(SCollectMetaKeyCxt* pCxt, SGrantStmt* pStmt) {
|
||||||
|
|
|
@ -8080,6 +8080,10 @@ static int32_t fillCmdSql(STranslateContext* pCxt, int16_t msgType, void* pReq)
|
||||||
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactDbReq, pReq);
|
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactDbReq, pReq);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TDMT_MND_COMPACT_VGROUPS: {
|
||||||
|
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SCompactVgroupsReq, pReq);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case TDMT_MND_TMQ_DROP_TOPIC: {
|
case TDMT_MND_TMQ_DROP_TOPIC: {
|
||||||
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropTopicReq, pReq);
|
FILL_CMD_SQL(sql, sqlLen, pCmdReq, SMDropTopicReq, pReq);
|
||||||
|
|
Loading…
Reference in New Issue