Skip to content

Commit

Permalink
Add reindex operation (#92)
Browse files Browse the repository at this point in the history
Add new challenge with reindex operation to http_logs track
in order to verify reindex performance before and after resilient
reindex implementation.

Relates elastic/elasticsearch#42612
  • Loading branch information
henningandersen committed Jan 9, 2020
1 parent b3dd81b commit ec69176
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
61 changes: 61 additions & 0 deletions http_logs/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,65 @@
"clients": 1
}
]
},
{
"name": "append-no-conflicts-index-reindex-only",
"description": "Indexes the whole document corpus using Elasticsearch default settings. We only adjust the number of replicas as we benchmark a single node cluster and Rally will only start the benchmark if the cluster turns green. Document ids are unique so all index operations are append only. After indexing, same data are reindexed.",
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {{index_settings | default({}) | tojson}}
}
},
{
"name": "check-cluster-health",
"operation": {
"operation-type": "cluster-health",
"index": "logs-*",
"request-params": {
"wait_for_status": "{{cluster_health | default('green')}}",
"wait_for_no_relocating_shards": "true"
}
}
},
{
"operation": "index-append",
"warmup-time-period": 240,
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"name": "refresh-after-index",
"operation": "refresh",
"clients": 1
},
{
"operation": "force-merge",
"clients": 1
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "reindex",
"operation": {
"operation-type": "reindex",
"body": {
"source": {
"index": "logs-*"
},
"dest": {
"index": "reindexed-logs"
}
},
"request_timeout": 7200
},
"clients": 1
}
]
}
4 changes: 4 additions & 0 deletions http_logs/track.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
{
"name": "logs-241998",
"body": "index.json"
},
{
"name": "reindexed-logs",
"body": "index.json"
}
],
"corpora": [
Expand Down
6 changes: 6 additions & 0 deletions http_logs/track.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def reindex(es, params):
result = es.reindex(body=params.get("body"), request_timeout=params.get("request_timeout"))
return result["total"], "docs"

def register(registry):
registry.register_runner("reindex", reindex)

0 comments on commit ec69176

Please sign in to comment.