]> source.dussan.org Git - sonarqube.git/commit
Improve db migration from 5.0 and indexing step at server startup
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 13 Mar 2015 16:43:27 +0000 (17:43 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 17 Mar 2015 14:21:43 +0000 (15:21 +0100)
commit5e691b5d2c39e58a626b8ed29207cdcab1bb1223
treefe762b7abf7784550fd4cae800d2c2345eef76f1
parent698475e10b0f3cfedb87399cae0711eded0d416b
Improve db migration from 5.0 and indexing step at server startup

* Parallel bulk indexing of documents into Elasticsearch
* reduce memory consumption when building JSON requests
* no need to change type of column PROJECT_MEASURES.MEASURE_DATE as it is not used
* fix created_at/updated_at fields of manual_measure when saved from Rails
* remove usage of deprecated delete-by-query
58 files changed:
server/sonar-search/src/main/java/org/sonar/search/SearchServer.java
server/sonar-search/src/main/java/org/sonar/search/SearchSettings.java
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityIndexer.java
server/sonar-server/src/main/java/org/sonar/server/activity/index/ActivityResultSetIterator.java
server/sonar-server/src/main/java/org/sonar/server/db/migrations/DatabaseMigrations.java
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedProjectMeasuresLongDates.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/es/BulkIndexer.java
server/sonar-server/src/main/java/org/sonar/server/es/EsUtils.java
server/sonar-server/src/main/java/org/sonar/server/es/request/ProxyBulkRequestBuilder.java
server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndexer.java
server/sonar-server/src/main/java/org/sonar/server/search/SearchClient.java
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceFileResultSetIterator.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineDoc.java
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexDefinition.java
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineIndexer.java
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceLineResultSetIterator.java [deleted file]
server/sonar-server/src/main/java/org/sonar/server/util/DateCollector.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/util/ProgressLogger.java
server/sonar-server/src/test/java/org/sonar/server/activity/index/ActivityResultSetIteratorTest.java
server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedProjectMeasuresLongDatesTest.java [deleted file]
server/sonar-server/src/test/java/org/sonar/server/es/BulkIndexerTest.java
server/sonar-server/src/test/java/org/sonar/server/es/EsUtilsTest.java
server/sonar-server/src/test/java/org/sonar/server/es/FakeIndexDefinition.java
server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/search/SearchClientMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/source/index/SourceFileResultSetIteratorTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineIndexerTest.java
server/sonar-server/src/test/java/org/sonar/server/source/index/SourceLineResultSetIteratorTest.java [deleted file]
server/sonar-server/src/test/java/org/sonar/server/util/DateCollectorTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/util/ProgressLoggerTest.java
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedProjectMeasuresLongDatesTest/before.xml [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/FeedProjectMeasuresLongDatesTest/schema.sql [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceFileResultSetIteratorTest/schema.sql [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceFileResultSetIteratorTest/shared.xml [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/P1_F1_line1.json [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/P1_F1_line2.json [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/P1_F2_line1.json [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/P2_F3_line1.json [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/line2.json [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/line2_other_file.json [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/line3.json [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineIndexerTest/line3_other_project.json [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineResultSetIteratorTest/schema.sql [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/source/index/SourceLineResultSetIteratorTest/shared.xml [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/app/models/manual_measure.rb
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/787_add_manual_measures_long_dates.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/787_add_measures_long_dates.rb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_manual_measures_long_dates.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/788_feed_measures_long_dates.rb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/789_rename_manual_measures_long_dates.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/789_rename_measures_long_dates.rb [deleted file]
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-plugin-api/src/main/java/org/sonar/api/database/model/MeasureModel.java
sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
sonar-plugin-api/src/main/resources/org/sonar/api/database/model/MeasureMapper.xml
sonar-plugin-api/src/test/java/org/sonar/api/utils/text/JsonWriterTest.java