yyqdbngt opened a new pull request, #2921: URL: https://github.com/apache/rocketmq-dashboard/pull/2921
## Summary - Parse `studio.alerting.snapshot-retention` defensively in `CollectorScheduler.cleanUpSnapshots()`, reusing the existing `parsePositiveDuration` helper (now parameterized with a setting name for accurate log messages) - A malformed or non-positive retention value falls back to the 24h default retention with a warning instead of throwing out of the scheduled task ## Why `cleanUpSnapshots()` ran `Duration.parse(properties.getSnapshotRetention())` without any guard, while its two sibling settings (`studio.alerting.collection-timeout` and `studio.alerting.collection-lease-duration`) already use defensive parsing. A typo in the retention value (e.g. `1h` instead of `PT1H`) made the hourly cleanup task throw a `DateTimeParseException` on every run, so the short-lived `rmq_metric_snapshot` table grew unbounded until the configuration was fixed. ## Testing - `mvn -Dtest=CollectorSchedulerTest test` → Tests run: 7, Failures: 0, Errors: 0 (1 new: a malformed retention value no longer throws and still deletes expired snapshots using the fallback) -- 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]
