Skip to content

Commit

Permalink
Add Elasticsearch 7 support (jaegertracing#1690)
Browse files Browse the repository at this point in the history
* Make it possible to run es-integration-test against different versions of elasticsearch

A convenient way to run the elasticsearch integration test is to just run ./scripts/travis/es-integration-test.sh

This change allows you to specify different elasticsearch versions

eg

ES_VERSION=5.6.12 scripts/travis/es-integration-test.sh
ES_VERSION=6.8.1 scripts/travis/es-integration-test.sh
ES_VERSION=7.2.0 scripts/travis/es-integration-test.sh

The default version to use for the tests is currently 5.6.12

Signed-off-by: Greg Franklin <[email protected]>

* Update github.com/olivere/elastic to 6.2.21

Signed-off-by: Greg Franklin <[email protected]>

* Migrate to a single '_doc' elasticsearch document type

Signed-off-by: Greg Franklin <[email protected]>

* Add IncludeTypeName for compatability with elasticsearch 7.x

Signed-off-by: Greg Franklin <[email protected]>

* Remove deprecated __default__ field from es mappings

Signed-off-by: Greg Franklin <[email protected]>

* Rebase on master.  Fix for ES5

Signed-off-by: Greg Franklin <[email protected]>

* Update esRollover.py to use per-version templates

Signed-off-by: Greg Franklin <[email protected]>

* Update github.com/olivere/elastic to 6.2.22 and use RestTotalHitsAsInt against ES7

Signed-off-by: Greg Franklin <[email protected]>

* esRollover.py should set '?include_type_name=true' when creating templates for ES7

Signed-off-by: Greg Franklin <[email protected]>

* Check loading of all versions of the ES mappings

Signed-off-by: Greg Franklin <[email protected]>

* Run es-integration-test.sh against ES5, ES6 and ES7

Signed-off-by: Greg Franklin <[email protected]>

* Run 'make fmt' to add license text to mocks

Signed-off-by: Greg Franklin <[email protected]>

* Update elasticsearch versions used for integration tests (and add --rm to docker commands)

Signed-off-by: Greg Franklin <[email protected]>

* Do not use IncludeTypeName on ES7

Without IncludeTypeName, ES will use the type "_doc" all documents.

Type is removed from all search queries so that it queries all types
whether they be "_doc" or (eg) "span".

Type should not be used when indexing documents on ES7 (so that the
default "_doc" type is used).  It should, however, be used on ES5 and ES6
so that the type matches that described by the mapping.

Signed-off-by: Greg Franklin <[email protected]>

* Log elasticsearch version

Signed-off-by: Greg Franklin <[email protected]>

* Make sure we can get the elasticsearch version on servers other than localhost

Signed-off-by: Greg Franklin <[email protected]>

* Fix es dependency storage test

Signed-off-by: Greg Franklin <[email protected]>

* Fix token propagation test for elasticsearch version detection

The query service needs to detect the elasticsearch version to start up.

Elasticsearch must therefore be started before the query service and must
return a version number in response to a ping request

Signed-off-by: Greg Franklin <[email protected]>

* Fix lint failure

plugin/storage/es/dependencystore/schema.go:37:9: if block ends with a return statement, so drop this else and outdent its block

Signed-off-by: Greg Franklin <[email protected]>

* Use the same file for elasticsearch mappings on ES5 and ES6.  Only ES7 needs to be different

Signed-off-by: Greg Franklin <[email protected]>

* Change log message to use structured logging

Signed-off-by: Greg Franklin <[email protected]>
Signed-off-by: kennyaz <[email protected]>
  • Loading branch information
gregoryfranklin authored and kennyaz committed Jun 12, 2023
1 parent c582d89 commit 9451a71
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 9451a71

Please sign in to comment.