zhuangchong commented on code in PR #9371:
URL: https://github.com/apache/dolphinscheduler/pull/9371#discussion_r846889745
##########
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:
This method is triggered when the master server or worker server stops,
which is not a lot, I suggest that you don't need to add. Can be added to the
alert server.
--
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]