update test case

This commit is contained in:
yihaoDeng 2023-09-14 09:25:23 +08:00
parent 7ec31029e6
commit da55d7e67e
3 changed files with 13 additions and 13 deletions

View File

@ -31,10 +31,10 @@ static void dmUpdateDnodeCfg(SDnodeMgmt *pMgmt, SDnodeCfg *pCfg) {
} }
} }
static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) { static void dmMayShouldUpdateIpWhiteList(SDnodeMgmt *pMgmt, int64_t ver) {
dInfo("ip-white-dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->ipWhiteVer, ver); dDebug("ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->ipWhiteVer, ver);
if (pMgmt->ipWhiteVer == ver) { if (pMgmt->ipWhiteVer == ver) {
if (ver == 0) { if (ver == 0) {
dInfo("disable ip-white-dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->ipWhiteVer, ver); dDebug("disable ip-white-list on dnode ver: %" PRId64 ", status ver: %" PRId64 "", pMgmt->ipWhiteVer, ver);
rpcSetIpWhite(pMgmt->msgCb.serverRpc, NULL); rpcSetIpWhite(pMgmt->msgCb.serverRpc, NULL);
pMgmt->ipWhiteVer = ver; pMgmt->ipWhiteVer = ver;
} }

View File

@ -195,7 +195,7 @@ int64_t mndGetIpWhiteVer(SMnode *pMnode) {
} }
ver = ipWhiteMgt.ver; ver = ipWhiteMgt.ver;
taosThreadRwlockUnlock(&ipWhiteMgt.rw); taosThreadRwlockUnlock(&ipWhiteMgt.rw);
mInfo("ip-white-mnode ver: %" PRId64 "", ver); mDebug("ip-white-list on mnode ver: %" PRId64 "", ver);
if (mndEnableIpWhiteList(pMnode) == 0 || tsEnableWhiteList == false) { if (mndEnableIpWhiteList(pMnode) == 0 || tsEnableWhiteList == false) {
return 0; return 0;

View File

@ -96,8 +96,8 @@ typedef struct SWorkThrd {
bool quit; bool quit;
SIpWhiteListTab* pWhiteList; SIpWhiteListTab* pWhiteList;
int64_t whiteListVer; int64_t whiteListVer;
int8_t enableIpWhiteList; int8_t enableIpWhiteList;
} SWorkThrd; } SWorkThrd;
typedef struct SServerObj { typedef struct SServerObj {
@ -121,12 +121,12 @@ typedef struct SServerObj {
} SServerObj; } SServerObj;
SIpWhiteListTab* uvWhiteListCreate(); SIpWhiteListTab* uvWhiteListCreate();
void uvWhiteListDestroy(SIpWhiteListTab* pWhite); void uvWhiteListDestroy(SIpWhiteListTab* pWhite);
void uvWhiteListAdd(SIpWhiteListTab* pWhite, char* user, SIpWhiteList* pList, int64_t ver); void uvWhiteListAdd(SIpWhiteListTab* pWhite, char* user, SIpWhiteList* pList, int64_t ver);
void uvWhiteListUpdate(SIpWhiteListTab* pWhite, SHashObj* pTable); void uvWhiteListUpdate(SIpWhiteListTab* pWhite, SHashObj* pTable);
bool uvWhiteListCheckConn(SIpWhiteListTab* pWhite, SSvrConn* pConn); bool uvWhiteListCheckConn(SIpWhiteListTab* pWhite, SSvrConn* pConn);
bool uvWhiteListFilte(SIpWhiteListTab* pWhite, char* user, uint32_t ip, int64_t ver); bool uvWhiteListFilte(SIpWhiteListTab* pWhite, char* user, uint32_t ip, int64_t ver);
void uvWhiteListSetConnVer(SIpWhiteListTab* pWhite, SSvrConn* pConn); void uvWhiteListSetConnVer(SIpWhiteListTab* pWhite, SSvrConn* pConn);
static void uvAllocConnBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); static void uvAllocConnBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
static void uvAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf); static void uvAllocRecvBufferCb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf);
@ -263,7 +263,7 @@ void uvWhiteListDebug(SIpWhiteListTab* pWrite) {
char* buf = NULL; char* buf = NULL;
uvWhiteListToStr(pUserList, user, &buf); uvWhiteListToStr(pUserList, user, &buf);
tDebug("white %s", buf); tDebug("ip-white-list %s", buf);
taosMemoryFree(buf); taosMemoryFree(buf);
pIter = taosHashIterate(pWhiteList, pIter); pIter = taosHashIterate(pWhiteList, pIter);
} }
@ -1568,7 +1568,7 @@ _return2:
void transSetIpWhiteList(void* thandle, void* arg, FilteFunc* func) { void transSetIpWhiteList(void* thandle, void* arg, FilteFunc* func) {
STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)thandle); STrans* pTransInst = (STrans*)transAcquireExHandle(transGetInstMgt(), (int64_t)thandle);
tInfo("update ip white list"); tDebug("ip-white-list update on rpc");
SServerObj* svrObj = pTransInst->tcphandle; SServerObj* svrObj = pTransInst->tcphandle;
for (int i = 0; i < svrObj->numOfThreads; i++) { for (int i = 0; i < svrObj->numOfThreads; i++) {
SWorkThrd* pThrd = svrObj->pThreadObj[i]; SWorkThrd* pThrd = svrObj->pThreadObj[i];