修复cma上报空报文,cms日志风暴问题
This commit is contained in:
parent
4c0638c203
commit
ca46e81bb5
@ -75,6 +75,10 @@ static inline void WakeCmaSendThread()
|
||||
|
||||
void PushMsgToCmsSendQue(const char *msgPtr, uint32 msgLen, const char *msgInfo)
|
||||
{
|
||||
if (msgPtr != NULL && msgLen >= sizeof(int32) && *(int32*)msgPtr == 0) {
|
||||
write_runlog(LOG, "%s msgPtr is 0. it may be error.\n", msgInfo);
|
||||
}
|
||||
|
||||
AgentMsgPkg msgPkg = {0};
|
||||
msgPkg.msgLen = msgLen;
|
||||
msgPkg.msgPtr = GetMsgBufAndFillBuf(msgPtr, msgLen);
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "cma_connect.h"
|
||||
#include "cma_process_messages_client.h"
|
||||
#include "cma_instance_management.h"
|
||||
#include "cma_instance_management_res.h"
|
||||
#include "cma_instance_check.h"
|
||||
#include "cma_mes.h"
|
||||
#include "cma_process_messages.h"
|
||||
@ -59,8 +60,10 @@ static void InstancesStatusCheckAndReport(void)
|
||||
fenced_UDF_status_check_and_report();
|
||||
etcd_status_check_and_report();
|
||||
kerberos_status_check_and_report();
|
||||
SendResStatReportMsg();
|
||||
SendResIsregReportMsg();
|
||||
if (IsCusResExistLocal()) {
|
||||
SendResStatReportMsg();
|
||||
SendResIsregReportMsg();
|
||||
}
|
||||
}
|
||||
|
||||
static void AgentSendHeartbeat()
|
||||
|
@ -288,10 +288,6 @@ void *ResourceStatusCheckMain(void *arg)
|
||||
|
||||
void SendResStatReportMsg()
|
||||
{
|
||||
if (!IsCusResExistLocal()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ReportResStatus reportMsg = {0};
|
||||
reportMsg.msgType = (int)MSG_AGENT_CM_RESOURCE_STATUS;
|
||||
|
||||
|
@ -1370,6 +1370,12 @@ void *CM_IOThreadMain(void *argp)
|
||||
CloseAllConnections(thrinfo);
|
||||
|
||||
thrinfo->isBusy = false;
|
||||
/* wait for events to happen, 5s timeout */
|
||||
if (existSendMsg((PriMsgQues*)thrinfo->sendMsgQue)) {
|
||||
waitTime = 1;
|
||||
} else {
|
||||
waitTime = EPOLL_TIMEOUT;
|
||||
}
|
||||
uint64 t2 = GetMonotonicTimeMs();
|
||||
int fds = epoll_pwait(epollHandle, events, MAX_EVENTS, waitTime, &block_sig_set);
|
||||
if (fds < 0) {
|
||||
|
@ -13,11 +13,11 @@
|
||||
* See the Mulan PSL v2 for more details.
|
||||
* -------------------------------------------------------------------------
|
||||
*
|
||||
* cma_instance_management.h
|
||||
* cma_instance_management_res.h
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* include/cm/cm_agent/cma_instance_management.h
|
||||
* include/cm/cm_agent/cma_instance_management_res.h
|
||||
*
|
||||
* -------------------------------------------------------------------------
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user