Skip to content

Commit

Permalink
Drop support for Elasticsearch 5.x (#1237)
Browse files Browse the repository at this point in the history
Elasticsearch 5.x is end of life since 2019-03-11. According to our
version policy in Rally we drop support two years after the end of life
date.

Relates #1107
  • Loading branch information
danielmitterdorfer committed Apr 19, 2021
1 parent 8874e50 commit a140a6a
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 28 deletions.
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ You want to benchmark Elasticsearch? Then Rally is for you. It can help you with

We have also put considerable effort in Rally to ensure that benchmarking data are reproducible.

In general, Rally works with all versions of Elasticsearch starting from 1.x but benchmarking with plugins and benchmarking source builds will only work from Elasticsearch 5.0 onwards.

Quick Start
-----------

Expand Down
10 changes: 5 additions & 5 deletions docs/command_line_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,14 @@ and reference it when running Rally::
``runtime-jdk``
~~~~~~~~~~~~~~~

By default, Rally will derive the appropriate runtime JDK versions automatically per version of Elasticsearch. For example, it will choose JDK 8 for Elasticsearch 5.0.0 but JDK 12, 11 or 8 for Elasticsearch 7.0.0. It will choose the highest available version.
By default, Rally will derive the appropriate runtime JDK versions automatically per version of Elasticsearch. For example, it will choose JDK 12, 11 or 8 for Elasticsearch 7.0.0. It will choose the highest available version.

This command line parameter sets the major version of the JDK that Rally should use to run Elasticsearch. It is required that either ``JAVA_HOME`` or ``JAVAx_HOME`` (where ``x`` is the major version, e.g. ``JAVA11_HOME`` for a JDK 11) points to the appropriate JDK.

Example::

# Run a benchmark with defaults (i.e. JDK 8)
esrally race --track=geonames --distribution-version=5.0.0
# Run a benchmark with defaults
esrally race --track=geonames --distribution-version=7.0.0
# Force to run with JDK 11
esrally race --track=geonames --distribution-version=7.0.0 --runtime-jdk=11

Expand All @@ -547,7 +547,7 @@ It is also possible to specify the JDK that is bundled with Elasticsearch with t
``revision``
~~~~~~~~~~~~

If you actively develop Elasticsearch and want to benchmark a source build of Elasticsearch (which Rally will create for you), you can specify the git revision of Elasticsearch that you want to benchmark. But note that Rally uses and expects the Gradle Wrapper in the Elasticsearch repository (``./gradlew``) which effectively means that it will only support this for Elasticsearch 5.0 or better. The default value is ``current``.
If you actively develop Elasticsearch and want to benchmark a source build of Elasticsearch (which Rally will create for you), you can specify the git revision of Elasticsearch that you want to benchmark. The default value is ``current``.

You can specify the revision in different formats:

Expand All @@ -563,7 +563,7 @@ If you want to create source builds of Elasticsearch plugins, you need to specif
Examples:

* Build latest Elasticsearch and plugin "my-plugin": ``--revision="elasticsearch:latest,my-plugin:latest"``
* Build Elasticsearch tag ``v5.6.1`` and revision ``abc123`` of plugin "my-plugin": ``--revision="elasticsearch:v5.6.1,my-plugin:abc123"``
* Build Elasticsearch tag ``v7.12.0`` and revision ``abc123`` of plugin "my-plugin": ``--revision="elasticsearch:v7.12.0,my-plugin:abc123"``

Note that it is still required to provide the parameter ``--elasticsearch-plugins``. Specifying a plugin with ``--revision`` just tells Rally which revision to use for building the artifact. See the documentation on :doc:`Elasticsearch plugins </elasticsearch_plugins>` for more details.

Expand Down
10 changes: 5 additions & 5 deletions docs/elasticsearch_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ In order to tell Rally to install a plugin, use the ``--elasticsearch-plugins``

Example::

esrally race --track=geonames --distribution-version=5.5.0 --elasticsearch-plugins="analysis-icu,analysis-phonetic"
esrally race --track=geonames --distribution-version=7.12.0 --elasticsearch-plugins="analysis-icu,analysis-phonetic"

This will install the plugins ``analysis-icu`` and ``analysis-phonetic`` (in that order). In order to use the features that these plugins provide, you need to write a :doc:`custom track </adding_tracks>`.

Expand Down Expand Up @@ -100,7 +100,7 @@ Let's discuss these properties one by one:
In order to run a benchmark with ``my-plugin``, you'd invoke Rally as follows: ``esrally race --track=geonames --revision="elasticsearch:some-elasticsearch-revision,my-plugin:some-plugin-revision" --elasticsearch-plugins="my-plugin"`` where you need to replace ``some-elasticsearch-revision`` and ``some-plugin-revision`` with the appropriate :ref:`git revisions <clr_revision>`. Adjust other command line parameters (like track or car) accordingly. In order for this to work, you need to ensure that:

* All prerequisites for source builds are installed.
* The Elasticsearch source revision is compatible with the chosen plugin revision. Note that you do not need to know the revision hash to build against an already released version and can use git tags instead. E.g. if you want to benchmark against Elasticsearch 5.6.1, you can specify ``--revision="elasticsearch:v5.6.1,my-plugin:some-plugin-revision"`` (see e.g. the `Elasticsearch tags on Github <https://github.com/elastic/elasticsearch/tags>`_ or use ``git tag`` in the Elasticsearch source directory on the console).
* The Elasticsearch source revision is compatible with the chosen plugin revision. Note that you do not need to know the revision hash to build against an already released version and can use git tags instead. E.g. if you want to benchmark against Elasticsearch 7.12.0, you can specify ``--revision="elasticsearch:v7.12.0,my-plugin:some-plugin-revision"`` (see e.g. the `Elasticsearch tags on Github <https://github.com/elastic/elasticsearch/tags>`_ or use ``git tag`` in the Elasticsearch source directory on the console).
* If your plugin needs to be configured, create a proper plugin specification (see below).

.. note::
Expand Down Expand Up @@ -223,9 +223,9 @@ As ``myplugin`` is not a core plugin, the Elasticsearch plugin manager does not
[distributions]
plugin.myplugin.release.url=https://example.org/myplugin/releases/{{VERSION}}/myplugin-{{VERSION}}.zip

Now you can run benchmarks with the custom Elasticsearch plugin, e.g. with ``esrally race --track=geonames --distribution-version=5.5.0 --elasticsearch-plugins="myplugin:simple"``.
Now you can run benchmarks with the custom Elasticsearch plugin, e.g. with ``esrally race --track=geonames --distribution-version=7.12.0 --elasticsearch-plugins="myplugin:simple"``.

For this to work you need ensure two things:

1. The plugin needs to be available for the version that you want to benchmark (5.5.0 in the example above).
2. Rally will choose the most appropriate branch in the team repository before starting the benchmark. In practice, this will most likely be branch "5" for this example. Therefore you need to ensure that your plugin configuration is also available on that branch. See the `README in the team repository <https://github.com/elastic/rally-teams#versioning-scheme>`_ to learn how the versioning scheme works.
1. The plugin needs to be available for the version that you want to benchmark (7.12.0 in the example above).
2. Rally will choose the most appropriate branch in the team repository before starting the benchmark. See the documentation on :ref:`how branches are mapped to Elasticsearch versions <track-repositories-fall-back-logic>`.
2 changes: 1 addition & 1 deletion docs/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Here is a typical metrics record::
"host_name": "beast2",
"node_name": "rally-node0",
"source_revision": "a6c0a81",
"distribution_version": "5.0.0-SNAPSHOT",
"distribution_version": "8.0.0-SNAPSHOT",
"tag_reference": "Github ticket 1234"
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/pipelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The version numbers have to match the name in the download URL path.

You can also benchmark Elasticsearch snapshot versions by specifying the snapshot repository::

esrally race --track=geonames --pipeline=from-distribution --distribution-version=5.0.0-SNAPSHOT --distribution-repository=snapshot
esrally race --track=geonames --pipeline=from-distribution --distribution-version=8.0.0-SNAPSHOT --distribution-repository=snapshot

However, this feature is mainly intended for continuous integration environments and by default you should just benchmark official distributions.

Expand All @@ -49,7 +49,7 @@ However, this feature is mainly intended for continuous integration environments
from-sources
~~~~~~~~~~~~

You should use this pipeline when you want to build and benchmark Elasticsearch from sources. This pipeline will only work from Elasticsearch 5.0 onwards because Elasticsearch switched from Maven to Gradle and Rally only supports one build tool in the interest of maintainability.
You should use this pipeline when you want to build and benchmark Elasticsearch from sources.

Remember that you also need git installed. If that's not the case you'll get an error. An example invocation::

Expand Down
2 changes: 1 addition & 1 deletion docs/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To run a benchmark for this scenario follow these steps:

1. :doc:`Install </install>` and :doc:`configure </configuration>` Rally on all machines. Be sure that the same version is installed on all of them and fully :doc:`configured </configuration>`.
2. Start the :doc:`Rally daemon </rally_daemon>` on each machine. The Rally daemon allows Rally to communicate with all remote machines. On the benchmark coordinator run ``esrallyd start --node-ip=10.5.5.5 --coordinator-ip=10.5.5.5`` and on the benchmark candidate machines run ``esrallyd start --node-ip=10.5.5.10 --coordinator-ip=10.5.5.5`` and ``esrallyd start --node-ip=10.5.5.11 --coordinator-ip=10.5.5.5`` respectively. The ``--node-ip`` parameter tells Rally the IP of the machine on which it is running. As some machines have more than one network interface, Rally will not attempt to auto-detect the machine IP. The ``--coordinator-ip`` parameter tells Rally the IP of the benchmark coordinator node.
3. Start the benchmark by invoking Rally as usual on the benchmark coordinator, for example: ``esrally race --track=pmc --distribution-version=5.0.0 --target-hosts=10.5.5.10:39200,10.5.5.11:39200``. Rally will derive from the ``--target-hosts`` parameter that it should provision the nodes ``10.5.5.10`` and ``10.5.5.11``.
3. Start the benchmark by invoking Rally as usual on the benchmark coordinator, for example: ``esrally race --track=pmc --distribution-version=7.0.0 --target-hosts=10.5.5.10:39200,10.5.5.11:39200``. Rally will derive from the ``--target-hosts`` parameter that it should provision the nodes ``10.5.5.10`` and ``10.5.5.11``.
4. After the benchmark has finished you can stop the Rally daemon again. On the benchmark coordinator and on the benchmark candidates run ``esrallyd stop``.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/track.rst
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ Properties
* ``corpora`` (optional): A list of document corpus names that should be targeted by this bulk-index operation. Only needed if the ``corpora`` section contains more than one document corpus and you don't want to index all of them with this operation.
* ``indices`` (optional): A list of index names that defines which indices should be used by this bulk-index operation. Rally will then only select the documents files that have a matching ``target-index`` specified.
* ``batch-size`` (optional): Defines how many documents Rally will read at once. This is an expert setting and only meant to avoid accidental bottlenecks for very small bulk sizes (e.g. if you want to benchmark with a bulk-size of 1, you should set ``batch-size`` higher).
* ``pipeline`` (optional): Defines the name of an (existing) ingest pipeline that should be used (only supported from Elasticsearch 5.0).
* ``pipeline`` (optional): Defines the name of an (existing) ingest pipeline that should be used.
* ``conflicts`` (optional): Type of index conflicts to simulate. If not specified, no conflicts will be simulated (also read below on how to use external index ids with no conflicts). Valid values are: 'sequential' (A document id is replaced with a document id with a sequentially increasing id), 'random' (A document id is replaced with a document id with a random other id).
* ``conflict-probability`` (optional, defaults to 25 percent): A number between [0, 100] that defines how many of the documents will get replaced. Combining ``conflicts=sequential`` and ``conflict-probability=0`` makes Rally generate index ids by itself, instead of relying on Elasticsearch's `automatic id generation <https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#_automatic_id_generation>`_.
* ``on-conflict`` (optional, defaults to ``index``): Determines whether Rally should use the action ``index`` or ``update`` on id conflicts.
Expand Down
2 changes: 1 addition & 1 deletion docs/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Elasticsearch Version Support
Minimum supported version
=========================

Rally |release| can benchmark Elasticsearch 5.0.0 and above.
Rally |release| can benchmark Elasticsearch 6.0.0 and above.

End-of-life Policy
==================
Expand Down
9 changes: 3 additions & 6 deletions esrally/driver/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1062,13 +1062,11 @@ def status(v):
api_kw_params = self._default_kw_params(params)
# by default, Elasticsearch will not wait and thus we treat this as success
expected_cluster_status = request_params.get("wait_for_status", str(ClusterHealthStatus.UNKNOWN))
# newer ES versions >= 5.0
if "wait_for_no_relocating_shards" in request_params:
expected_relocating_shards = 0
else:
# older ES versions
# either the user has defined something or we're good with any count of relocating shards.
expected_relocating_shards = int(request_params.get("wait_for_relocating_shards", sys.maxsize))
# we're good with any count of relocating shards.
expected_relocating_shards = sys.maxsize

result = await es.cluster.health(**api_kw_params)
cluster_status = result["status"]
Expand All @@ -1091,8 +1089,7 @@ def __repr__(self, *args, **kwargs):

class PutPipeline(Runner):
"""
Execute the `put pipeline API <https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html>`_. Note that this
API is only available from Elasticsearch 5.0 onwards.
Execute the `put pipeline API <https://www.elastic.co/guide/en/elasticsearch/reference/current/put-pipeline-api.html>`_.
"""

async def __call__(self, es, params):
Expand Down
3 changes: 1 addition & 2 deletions esrally/mechanic/supplier.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ def create(cfg, sources, distribution, car, plugins=None):
def _required_version(version):
if not version or version.strip() == "":
raise exceptions.SystemSetupError("Could not determine version. Please specify the Elasticsearch distribution "
"to download with the command line parameter --distribution-version. "
"E.g. --distribution-version=5.0.0")
"to download with the command line parameter --distribution-version.")
else:
return version

Expand Down
2 changes: 1 addition & 1 deletion esrally/resources/track-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
},
"pipeline": {
"type": "string",
"description": "[Only for type == 'index']: Defines the name of the ingest node pipeline to use (only supported from Elasticsearch 5.0)."
"description": "[Only for type == 'index']: Defines the name of the ingest node pipeline to use."
},
"conflicts": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion it/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from esrally.utils import process

CONFIG_NAMES = ["in-memory-it", "es-it"]
DISTRIBUTIONS = ["5.6.16", "6.8.0", "7.6.0"]
DISTRIBUTIONS = ["6.8.0", "7.6.0"]
TRACKS = ["geonames", "nyc_taxis", "http_logs", "nested"]
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))

Expand Down

0 comments on commit a140a6a

Please sign in to comment.