diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-03-04 23:52:29 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-03-04 23:52:29 +0100 |
commit | 0fa0dd19538e28421b2da7220da388be7e950788 (patch) | |
tree | 59d63ce45536e02b37c40919638fd3e3f242ddef /server/sonar-server | |
parent | 6108a50f766dac17b0bd45258c70ffd346d366c1 (diff) | |
download | sonarqube-0fa0dd19538e28421b2da7220da388be7e950788.tar.gz sonarqube-0fa0dd19538e28421b2da7220da388be7e950788.zip |
SONAR-6229 fix indexing of active rules
Diffstat (limited to 'server/sonar-server')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java | 1 | ||||
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java index 66c8d2ff0ec..1c03d4fb89c 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/ServerComponents.java @@ -847,6 +847,7 @@ class ServerComponents { DoPrivileged.execute(new DoPrivileged.Task() { @Override protected void doPrivileged() { + startupContainer.getComponentByType(IndexSynchronizer.class).executeDeprecated(); startupContainer.startComponents(); startupContainer.getComponentByType(IndexSynchronizer.class).execute(); startupContainer.getComponentByType(ServerLifecycleNotifier.class).notifyStart(); diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java b/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java index 6e0a4dca98a..95bafedf6ee 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java +++ b/server/sonar-server/src/main/java/org/sonar/server/search/IndexSynchronizer.java @@ -67,7 +67,7 @@ public class IndexSynchronizer { this.activityIndexer = activityIndexer; } - public void execute() { + public void executeDeprecated() { DbSession session = db.openSession(false); try { synchronize(session, db.ruleDao(), index.get(RuleIndex.class)); @@ -76,7 +76,9 @@ public class IndexSynchronizer { } finally { session.close(); } + } + public void execute() { LOG.info("Index activities"); activityIndexer.setEnabled(true).index(); |