Starting Release Automation 6.9.1, a new feature has been added : Offline Deployments Cleanup.
In Release Notes for 6.9.1 ( Release Notes for 6.9.1 ) we could read this :
Added an option to move old deployments into offline tables. Suitable for improving the performance of instances with a large number of historical deployments, especially in the Deployments Overview page and related queries. For more detail, see Offline Deployments Cleanup
This article provides more details about this new feature.
Release Automation 6.9.1
This feature uses 2 new System Settings :
RELEASE_GRACE_PERIOD_TIME - if positive, deployments, which completed (or are in other final state, e.g. cancelled or failed) more then <value> days ago will be removed from the online tables and moved to the offline tables. If negative, the scheduler is disabled
RELEASE_WAKE_UP_PERSISTENCY_SCHEDULE - allows you to define how often to repeat the scheduled task after initial run (in minutes).
Changes to these system settings are permanent, but require Nolio restart.
Default value for these settings are :
RELEASE_GRACE_PERIOD_TIME = -1
RELEASE_WAKE_UP_PERSISTENCY_SCHEDULE = 1440
So if this option is by default disabled. And execution of the scheduled task is done every 24 hours.
To enable it update the System Settings RELEASE_GRACE_PERIOD_TIME to a non negative value.
Example :
RELEASE_GRACE_PERIOD_TIME = 60
Deployments older than 60 days will be moved from online tables to offline tables. (checking done every 24 hours)
These settings change are permanent but need a restart of Nolio service.
The rows in database tables for old release are moved from rc_* tables to off_rc_* tables (exemple rc_releases to off_rc_releases)
It is also possible to enable temporary this feature using JMX :
Open JMX console using url like :
http://localhost:20203/mbean?objectname=noliocenter%3Atype%3Dinfo
Default user/password is nolio/nolio
Execution of getReleasePurgeOldExecutionsJobStatus returns something like :
Then invoke recreateReleasePurgeOldScheduledExecutor to execute the feature :
Example of execution log :
2025-01-07T19:01:29.870+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor$FinalReleaseCleanerTask:117) - Running FinalReleasesCleanerTask now...
2025-01-07T19:01:29.872+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor:77) - Going to move 1 releases to the offline tables
2025-01-07T19:01:29.872+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor:81) - Copying of the finished release [1] to the offline tables is started.
2025-01-07T19:01:29.985+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.PurgingServiceImpl:496) - Creating offline release [1]
...
...
2025-01-07T19:01:30.021+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.PurgingServiceImpl:517) - Offline release [1] is created.
2025-01-07T19:01:30.097+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor:84) - Copying of the finished release [1] to the offline tables is successfully finished. Duration: 225 msecs.
2025-01-07T19:01:30.097+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor:90) - Remove old release [1] from the online tables is started.
2025-01-07T19:01:30.099+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.PurgingServiceImpl:241) - Removing release [1] is started...
2025-01-07T19:01:30.190+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.PurgingServiceImpl:252) - Release [1] is removed.
2025-01-07T19:01:30.233+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor:94) - Removing of the old release [1] from the online tables is successfully finished. Duration: 135 msecs.
2025-01-07T19:01:30.233+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.execution.dao.PurgingDaoImpl:178) - Grace Period is [2025-01-06T19:01:30.233+0100]
2025-01-07T19:01:30.234+01:00 [ReleaseToOffline-1] INFO (com.nolio.platform.server.dataservices.services.purging.PurgingServiceImpl:433) - There is no online release to remove
2025-01-07T19:01:30.234+01:00 [ReleaseToOffline-1] DEBUG (com.nolio.platform.server.dataservices.services.purging.ActiveReleaseToOfflineMonitor$FinalReleaseCleanerTask:133) - FinalReleasesCleanerTask is finished.