diff options
author | Jacek <jacek.poreda@sonarsource.com> | 2020-01-09 09:26:53 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-11-05 20:06:21 +0000 |
commit | f4751bd13509f8d325d17cb4cf4ed9d85025f65f (patch) | |
tree | 369137df20a5df287bf77cdb7dcf49888f282f31 /server/sonar-main/build.gradle | |
parent | 8cdee7d30f96e87b8bb7ec55fdfd8101ab717dfd (diff) | |
download | sonarqube-f4751bd13509f8d325d17cb4cf4ed9d85025f65f.tar.gz sonarqube-f4751bd13509f8d325d17cb4cf4ed9d85025f65f.zip |
SONAR-12686 upgrade es client to 7.9.3 and move to HTTP
- add should minimum match eq 1 to user index queries
ES 7.X changed behaviour in case filter query with bool it defaults to '0'
https://www.elastic.co/guide/en/elasticsearch/reference/7.x/breaking-changes-7.0.html#_the_filter_context_has_been_removed
- fix issue index routing param
ES 7.X helped discover this bug as new setting has been auto configured which is 'index.number_of_routing_shards'.
This has changed how documents are distributed across shards depending on how many shards the index has.
Without that change issues docs has been incorrectly routed to the same shard hash as projects and it worked no matter what routing key you used projectUuid or auth_projectUuid.
- update ngram and edge_ngram names to match with es 7.x
nGram and edgeNgram has been deprecated in favour of ngram and edge_ngram
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#deprecated-ngram-edgengram-token-filter-cannot-be-used
- remove `_all : enabled` usage from UT
This field was already deprecated in 6.X, now it has been removed.
https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking-changes-7.0.html#all-meta-field-removed
- add Elasticsearch High Level REST client dependency
- use sonar.search.port for ES HTTP
- main process use ES Rest client to check ES status
- sonar.cluster.search.hosts has HTTP ports on APP nodes
also sonar.search.port and sonar.search.host MUST be configured on each Search node with the host and HTTP port of the current node
- use Elasticsearch high level rest client
- use in EsTester
- use as primary es client
- use indices api to get all indices name instead of cluster api
- use cluster health api to check cluster state
- support raw requests for 'nodes/_stats' and '_cluster/stats'
- support raw requests for 'indices/_stats'
- leave netty4plugin as testCompile dependency it is used in UTs
- all ES non-test calls go through EsClient class
- add rest client ES profiling
Diffstat (limited to 'server/sonar-main/build.gradle')
-rw-r--r-- | server/sonar-main/build.gradle | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-main/build.gradle b/server/sonar-main/build.gradle index cb67a49fe04..2e11dd66e75 100644 --- a/server/sonar-main/build.gradle +++ b/server/sonar-main/build.gradle @@ -15,13 +15,11 @@ dependencies { compile 'com.hazelcast:hazelcast' compile 'commons-io:commons-io' compile 'commons-lang:commons-lang' - compile 'io.netty:netty-common' compile 'org.apache.logging.log4j:log4j-to-slf4j' compile 'org.apache.logging.log4j:log4j-api' - compile 'org.elasticsearch.client:transport' + compile 'org.elasticsearch.client:elasticsearch-rest-high-level-client' compile 'org.elasticsearch:elasticsearch' compile 'org.elasticsearch:elasticsearch-core' - compile 'org.elasticsearch.plugin:transport-netty4-client' compile 'org.slf4j:slf4j-api' compile 'org.yaml:snakeyaml' @@ -36,5 +34,7 @@ dependencies { testCompile 'org.assertj:assertj-core' testCompile 'org.awaitility:awaitility' testCompile 'org.mockito:mockito-core' + testCompile 'com.squareup.okhttp3:mockwebserver' + testCompile 'commons-logging:commons-logging:1.1.1' testCompile project(':sonar-testing-harness') } |