Skip to content

Commit

Permalink
Ensure segments are merged (#104)
Browse files Browse the repository at this point in the history
With this commit we change all tracks to increase the request timeout of the
`force-merge` task to ensure the force merge finishes before we move on. We also
include another task that waits until all ongoing segment merges finish. Older
Rally versions will entirely rely on the increased request timeout for force
merges but newer Rally versions (every version including elastic/rally#925) will
evaluate the condition and wait accordingly until the system is quiet.

Relates elastic/rally#925
  • Loading branch information
danielmitterdorfer committed Mar 3, 2020
1 parent dd3920f commit adc8549
Show file tree
Hide file tree
Showing 11 changed files with 457 additions and 57 deletions.
19 changes: 17 additions & 2 deletions eventdata/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,23 @@
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
}
76 changes: 68 additions & 8 deletions geonames/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,29 @@
"clients": 1
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
},
{
"operation": "index-stats",
"clients": 1,
Expand Down Expand Up @@ -173,8 +188,23 @@
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
},
Expand Down Expand Up @@ -211,8 +241,23 @@
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
},
Expand Down Expand Up @@ -250,8 +295,23 @@
"clients": {{bulk_indexing_clients | default(8)}}
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
}
Expand Down
57 changes: 48 additions & 9 deletions geopoint/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,30 @@
},
{
"operation": {
"operation-type": "force-merge"{%- if max_num_segments is defined %},
"operation-type": "force-merge",
"request-timeout": 7200{%- if max_num_segments is defined %},
"max-num-segments": {{max_num_segments}}
{%- endif %}
},
"clients": 1
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
},
{
"operation": "polygon",
"clients": 1,
Expand Down Expand Up @@ -112,16 +125,29 @@
},
{
"operation": {
"operation-type": "force-merge"{%- if max_num_segments is defined %},
"operation-type": "force-merge",
"request-timeout": 7200{%- if max_num_segments is defined %},
"max-num-segments": {{max_num_segments}}
{%- endif %}
},
"clients": 1
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
},
Expand Down Expand Up @@ -165,16 +191,29 @@
},
{
"operation": {
"operation-type": "force-merge"{%- if max_num_segments is defined %},
"operation-type": "force-merge",
"request-timeout": 7200{%- if max_num_segments is defined %},
"max-num-segments": {{max_num_segments}}
{%- endif %}
},
"clients": 1
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
}
57 changes: 51 additions & 6 deletions geopointshape/challenges/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,29 @@
"clients": 1
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
},
{
"operation": "polygon",
"clients": 1,
Expand Down Expand Up @@ -93,13 +108,28 @@
"clients": 1
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
},
Expand Down Expand Up @@ -142,13 +172,28 @@
"clients": 1
},
{
"operation": "force-merge",
"clients": 1
"operation": {
"operation-type": "force-merge",
"request-timeout": 7200
}
},
{
"name": "refresh-after-force-merge",
"operation": "refresh",
"clients": 1
},
{
"name": "wait-until-merges-finish",
"operation": {
"operation-type": "index-stats",
"index": "_all",
"condition": {
"path": "_all.total.merges.current",
"expected-value": 0
},
"retry-until-success": true,
"include-in-reporting": false
}
}
]
}
Loading

0 comments on commit adc8549

Please sign in to comment.