Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Elasticsearch 5.x #1237

Merged
merged 3 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.
ebadyano marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down
8 changes: 4 additions & 4 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 @@ -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
2 changes: 1 addition & 1 deletion 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 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