Skip to content

Commit

Permalink
0005842: Purge retention for monitor events and console events
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed May 17, 2023
1 parent d8f5efc commit 9aa24a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Expand Up @@ -312,6 +312,7 @@ private ParameterConstants() {
public final static String PURGE_STATS_RETENTION_MINUTES = "purge.stats.retention.minutes";
public final static String PURGE_TRIGGER_HIST_RETENTION_MINUTES = "purge.trigger.hist.retention.minutes";
public final static String PURGE_EXPIRED_DATA_GAP_RETENTION_MINUTES = "purge.expired.data.gap.retention.minutes";
public final static String PURGE_MONITOR_EVENT_RETENTION_MINUTES = "purge.monitor.event.retention.minutes";
public final static String PURGE_MAX_NUMBER_OF_DATA_IDS = "job.purge.max.num.data.to.delete.in.tx";
public final static String PURGE_MAX_NUMBER_OF_BATCH_IDS = "job.purge.max.num.batches.to.delete.in.tx";
public final static String PURGE_MAX_NUMBER_OF_EVENT_BATCH_IDS = "job.purge.max.num.data.event.batches.to.delete.in.tx";
Expand Down
Expand Up @@ -533,7 +533,7 @@ private long purgeRegistrationRequests() {

private long purgeMonitorEvents() {
Calendar retentionCutoff = Calendar.getInstance();
retentionCutoff.add(Calendar.MINUTE, -parameterService.getInt(ParameterConstants.PURGE_RETENTION_MINUTES));
retentionCutoff.add(Calendar.MINUTE, -parameterService.getInt(ParameterConstants.PURGE_MONITOR_EVENT_RETENTION_MINUTES));
log.info("Purging monitor events that are older than {}", fastFormat.format(retentionCutoff.getTime()));
long count = sqlTemplate.update(getSql("deleteMonitorEventSql"), retentionCutoff.getTime());
if (count > 0) {
Expand Down
Expand Up @@ -2031,6 +2031,13 @@ purge.trigger.hist.retention.minutes=43200
# Type: integer
purge.expired.data.gap.retention.minutes=1440

# This is the retention time for how long to keep monitor events before purging them.
#
# DatabaseOverridable: true
# Tags: purge
# Type: integer
purge.monitor.event.retention.minutes=43200

# If using the HsqlDbDialect, this property indicates whether Symmetric should setup the embedded database properties or if an
# external application will be doing so.
# Tags: other
Expand Down

0 comments on commit 9aa24a0

Please sign in to comment.