sonarqube – Sonar中未删除快照

我有一个声纳项目,快照可追溯到一年多前.问题是旧的snaphosts没有被删除,(我认为)导致SonarQube非常慢.我的数据库清理器配置将所有设置都设置为默认值.

当我从一个gradle任务运行声纳转轮时,它也会输出:

...
11:23:18.072 DEBUG - Post-jobs : org.sonar.plugins.dbcleaner.ProjectPurgePostJob@1cffdfd -> org.sonar.plugins.issueassign.notification.SendIssueNotificationsPostJob@140401 -> org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob@c5f5c2 -> org.sonar.plugins.core.batch.IndexProjectPostJob@19261ea
11:23:18.072 INFO  - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
11:23:18.503 INFO  - -> Keep one snapshot per day between 2014-09-12 and 2014-10-09
11:23:18.507 INFO  - -> Keep one snapshot per week between 2013-10-11 and 2014-09-12
11:23:18.513 INFO  - -> Keep one snapshot per month between 2009-10-16 and 2013-10-11
11:23:18.523 INFO  - -> Delete data prior to: 2009-10-16
11:23:18.524 DEBUG - ==>  Preparing: select * from projects p where p.id=? 
11:23:18.524 DEBUG - ==> Parameters: 1(Long)
11:23:18.526 DEBUG - <==      Total: 1
11:23:18.526 DEBUG - ==>  Preparing: select * from projects where scope='PRJ' and root_id=? 
11:23:18.526 DEBUG - ==> Parameters: 1(Long)
11:23:19.191 DEBUG - <==      Total: 186
11:23:19.191 DEBUG - ==>  Preparing: select * from projects where scope='PRJ' and root_id=? 
11:23:19.191 DEBUG - ==> Parameters: 2(Long)
11:23:19.192 DEBUG - <==      Total: 0
...
11:23:19.966 DEBUG - ==>  Preparing: select * from projects where scope='PRJ' and root_id=? 
11:23:19.966 DEBUG - ==> Parameters: 11658(Long)
11:23:19.967 DEBUG - <==      Total: 0
...

这让我相信项目配置正确.但是,旧数据根本不会被删除.我调高了日志级别并查看了sonar.log文件,但是我没有看到任何错误消息.但是,我也没有看到任何试图删除旧快照的SQL查询.

SonarQube使用在同一服务器上运行的MySQL数据库.

我正在运行SonarQube 4.5和SonarRunner 2.3

编辑:这是Sonar中快照页面(的一小部分)的屏幕截图.

在此屏幕截图中,我希望每周只保留1个快照.

最佳答案 请注意,除非您是
remove those events,否则包含事件
are never deleted的快照

点赞