czeming commented on code in PR #9371:
URL: https://github.com/apache/dolphinscheduler/pull/9371#discussion_r846902047
##########
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/AlertDao.java:
##########
@@ -131,8 +156,11 @@ public void sendServerStopedAlert(int alertGroupId, String
host, String serverTy
alert.setAlertGroupId(alertGroupId);
alert.setCreateTime(new Date());
alert.setUpdateTime(new Date());
+ alert.setSign(generateSign(alert));
// we use this method to avoid insert duplicate alert(issue #5525)
- alertMapper.insertAlertWhenServerCrash(alert);
+ // we modified this method to optimize performance(issue #9174)
+ Date crashAlarmSuppressionStartTime =
DateTime.now().plusMinutes(-crashAlarmSuppression).toDate();
+ alertMapper.insertAlertWhenServerCrash(alert,
crashAlarmSuppressionStartTime);
Review Comment:
I resolved the conflict.
Add reason for _crashAlarmSuppressionStartTime_:
1. The addition of this parameter is a key condition for the initial
screening of data, which can reduce the performance problems caused by the
increase of data.
2. **If this parameter is not added, according to the current logic, the
warning after the first time of the same host will not be added.**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]