TD-10431 rename some funcs
This commit is contained in:
parent
e63637fcce
commit
35b0c69333
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitAcct();
|
||||
void mndCleanupAcct();
|
||||
int32_t mndInitAcct(SMnode *pMnode);
|
||||
void mndCleanupAcct(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitAuth();
|
||||
void mndCleanupAuth();
|
||||
int32_t mndInitAuth(SMnode *pMnode);
|
||||
void mndCleanupAuth(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitBalance();
|
||||
void mndCleanupBalance();
|
||||
int32_t mndInitBalance(SMnode *pMnode);
|
||||
void mndCleanupBalance(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitCluster();
|
||||
void mndCleanupCluster();
|
||||
int32_t mndInitCluster(SMnode *pMnode);
|
||||
void mndCleanupCluster(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitDb();
|
||||
void mndCleanupDb();
|
||||
int32_t mndInitDb(SMnode *pMnode);
|
||||
void mndCleanupDb(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitDnode();
|
||||
void mndCleanupDnode();
|
||||
int32_t mndInitDnode(SMnode *pMnode);
|
||||
void mndCleanupDnode(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitFunc();
|
||||
void mndCleanupFunc();
|
||||
int32_t mndInitFunc(SMnode *pMnode);
|
||||
void mndCleanupFunc(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitMnode();
|
||||
void mndCleanupMnode();
|
||||
int32_t mndInitMnode(SMnode *pMnode);
|
||||
void mndCleanupMnode(SMnode *pMnode);
|
||||
void mndGetMnodeEpSetForPeer(SEpSet *epSet, bool redirect);
|
||||
void mndGetMnodeEpSetForShell(SEpSet *epSet, bool redirect);
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitOper();
|
||||
void mndCleanupOper();
|
||||
int32_t mndInitOper(SMnode *pMnode);
|
||||
void mndCleanupOper(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitProfile();
|
||||
void mndCleanupProfile();
|
||||
int32_t mndInitProfile(SMnode *pMnode);
|
||||
void mndCleanupProfile(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitShow();
|
||||
void mndCleanupShow();
|
||||
int32_t mndInitShow(SMnode *pMnode);
|
||||
void mndCleanupShow(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitStable();
|
||||
void mndCleanupStable();
|
||||
int32_t mndInitStable(SMnode *pMnode);
|
||||
void mndCleanupStable(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitSync();
|
||||
void mndCleanupSync();
|
||||
bool mndIsMaster();
|
||||
int32_t mndInitSync(SMnode *pMnode);
|
||||
void mndCleanupSync(SMnode *pMnode);
|
||||
bool mndIsMaster(SMnode *pMnode);
|
||||
int32_t mndSyncPropose(SSdbRaw *pRaw, void *pData);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -21,8 +21,8 @@ extern "C" {
|
|||
#endif
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitTelem();
|
||||
void mndCleanupTelem();
|
||||
int32_t mndInitTelem(SMnode *pMnode);
|
||||
void mndCleanupTelem(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitTrans();
|
||||
void mndCleanupTrans();
|
||||
int32_t mndInitTrans(SMnode *pMnode);
|
||||
void mndCleanupTrans(SMnode *pMnode);
|
||||
|
||||
STrans *trnCreate(ETrnPolicy policy, void *rpcHandle);
|
||||
void trnDrop(STrans *pTrans);
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitUser();
|
||||
void mndCleanupUser();
|
||||
int32_t mndInitUser(SMnode *pMnode);
|
||||
void mndCleanupUser(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
int32_t mndInitVgroup();
|
||||
void mndCleanupVgroup();
|
||||
int32_t mndInitVgroup(SMnode *pMnode);
|
||||
void mndCleanupVgroup(SMnode *pMnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ static int32_t mnodeCreateDefaultAcct() {
|
|||
return sdbWrite(pRaw);
|
||||
}
|
||||
|
||||
int32_t mndInitAcct() {
|
||||
int32_t mndInitAcct(SMnode *pMnode) {
|
||||
SSdbTable table = {.sdbType = SDB_ACCT,
|
||||
.keyType = SDB_KEY_BINARY,
|
||||
.deployFp = (SdbDeployFp)mnodeCreateDefaultAcct,
|
||||
|
@ -115,4 +115,4 @@ int32_t mndInitAcct() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void mndCleanupAcct() {}
|
||||
void mndCleanupAcct(SMnode *pMnode) {}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
#include "os.h"
|
||||
#include "mndAuth.h"
|
||||
|
||||
int32_t mndInitAuth() { return 0; }
|
||||
void mndCleanupAuth() {}
|
||||
int32_t mndInitAuth(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupAuth(SMnode *pMnode) {}
|
||||
|
||||
int32_t mndRetriveAuth(SMnode *pMnode, char *user, char *spi, char *encrypt, char *secret, char *ckey) {
|
||||
return 0;
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitBalance() { return 0; }
|
||||
void mndCleanupBalance() {}
|
||||
int32_t mndInitBalance(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupBalance(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitCluster() { return 0; }
|
||||
void mndCleanupCluster() {}
|
||||
int32_t mndInitCluster(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupCluster(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitDb() { return 0; }
|
||||
void mndCleanupDb() {}
|
||||
int32_t mndInitDb(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupDb(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitDnode() { return 0; }
|
||||
void mndCleanupDnode() {}
|
||||
int32_t mndInitDnode(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupDnode(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitFunc() { return 0; }
|
||||
void mndCleanupFunc() {}
|
||||
int32_t mndInitFunc(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupFunc(SMnode *pMnode) {}
|
|
@ -17,8 +17,8 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitMnode() { return 0; }
|
||||
void mndCleanupMnode() {}
|
||||
int32_t mndInitMnode(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupMnode(SMnode *pMnode) {}
|
||||
|
||||
void mndGetMnodeEpSetForPeer(SEpSet *epSet, bool redirect) {}
|
||||
void mndGetMnodeEpSetForShell(SEpSet *epSet, bool redirect) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitOper() { return 0; }
|
||||
void mndCleanupOper() {}
|
||||
int32_t mndInitOper(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupOper(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitProfile() { return 0; }
|
||||
void mndCleanupProfile() {}
|
||||
int32_t mndInitProfile(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupProfile(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitShow() { return 0; }
|
||||
void mndCleanupShow() {}
|
||||
int32_t mndInitShow(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupShow(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitStable() { return 0; }
|
||||
void mndCleanupStable() {}
|
||||
int32_t mndInitStable(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupStable(SMnode *pMnode) {}
|
|
@ -18,8 +18,8 @@
|
|||
#include "mndInt.h"
|
||||
#include "mndTrans.h"
|
||||
|
||||
int32_t mndInitSync() { return 0; }
|
||||
void mndCleanupSync() {}
|
||||
int32_t mndInitSync(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupSync(SMnode *pMnode) {}
|
||||
|
||||
int32_t mndSyncPropose(SSdbRaw *pRaw, void *pData) {
|
||||
trnApply(pData, pData, 0);
|
||||
|
|
|
@ -256,7 +256,7 @@ static void* mndTelemThreadFp(void* param) {
|
|||
if (r == 0) break;
|
||||
if (r != ETIMEDOUT) continue;
|
||||
|
||||
if (mndIsMaster()) {
|
||||
if (mndIsMaster(NULL)) {
|
||||
mndSendTelemetryReport();
|
||||
}
|
||||
end.tv_sec += REPORT_INTERVAL;
|
||||
|
@ -278,7 +278,7 @@ static void mndGetEmail(char* filepath) {
|
|||
taosCloseFile(fd);
|
||||
}
|
||||
|
||||
int32_t mndInitTelem() {
|
||||
int32_t mndInitTelem(SMnode *pMnode) {
|
||||
tsTelem.enable = tsEnableTelemetryReporting;
|
||||
if (!tsTelem.enable) return 0;
|
||||
|
||||
|
@ -303,7 +303,7 @@ int32_t mndInitTelem() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void mndCleanupTelem() {
|
||||
void mndCleanupTelem(SMnode *pMnode) {
|
||||
if (!tsTelem.enable) return;
|
||||
|
||||
if (taosCheckPthreadValid(tsTelem.thread)) {
|
||||
|
|
|
@ -312,7 +312,7 @@ int32_t trnAppendUndoAction(STrans *pTrans, SEpSet *pEpSet, void *pMsg) {
|
|||
return code;
|
||||
}
|
||||
|
||||
int32_t mndInitTrans() {
|
||||
int32_t mndInitTrans(SMnode *pMnode) {
|
||||
SSdbTable table = {.sdbType = SDB_TRANS,
|
||||
.keyType = SDB_KEY_INT32,
|
||||
.encodeFp = (SdbEncodeFp)trnActionEncode,
|
||||
|
@ -326,7 +326,7 @@ int32_t mndInitTrans() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void mndCleanupTrans() { mInfo("trn module is cleaned up"); }
|
||||
void mndCleanupTrans(SMnode *pMnode) { mInfo("trn module is cleaned up"); }
|
||||
|
||||
|
||||
int32_t trnPrepare(STrans *pTrans, int32_t (*syncfp)(SSdbRaw *pRaw, void *pData)) {
|
||||
|
|
|
@ -214,7 +214,7 @@ static int32_t mndProcessCreateUserMsg(SMnode *pMnode, SMnodeMsg *pMsg) {
|
|||
return TSDB_CODE_MND_ACTION_IN_PROGRESS;
|
||||
}
|
||||
|
||||
int32_t mndInitUser() {
|
||||
int32_t mndInitUser(SMnode *pMnode) {
|
||||
SSdbTable table = {.sdbType = SDB_USER,
|
||||
.keyType = SDB_KEY_BINARY,
|
||||
.deployFp = (SdbDeployFp)mndCreateDefaultUsers,
|
||||
|
@ -225,9 +225,9 @@ int32_t mndInitUser() {
|
|||
.deleteFp = (SdbDeleteFp)mndUserActionDelete};
|
||||
sdbSetTable(table);
|
||||
|
||||
mndSetMsgHandle(NULL, TSDB_MSG_TYPE_CREATE_USER, mndProcessCreateUserMsg);
|
||||
mndSetMsgHandle(pMnode, TSDB_MSG_TYPE_CREATE_USER, mndProcessCreateUserMsg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mndCleanupUser() {}
|
||||
void mndCleanupUser(SMnode *pMnode) {}
|
|
@ -17,5 +17,5 @@
|
|||
#include "os.h"
|
||||
#include "mndInt.h"
|
||||
|
||||
int32_t mndInitVgroup() { return 0; }
|
||||
void mndCleanupVgroup() {}
|
||||
int32_t mndInitVgroup(SMnode *pMnode) { return 0; }
|
||||
void mndCleanupVgroup(SMnode *pMnode) {}
|
Loading…
Reference in New Issue