Commit f91f132
authored
ES-10037 Configurable metrics in data stream auto-sharding (#125612)
This adds cluster settings to allow for a choice of write load metrics
in the data stream auto-sharding calculations. There are separate
settings for the increasing and decreasing calculations. Both default
to the existing 'all-time' metric for now.
This also refactors `DataStreamAutoShardingServiceTests`. The main two things done are:
- Split large test methods which do several independent tests in
blank code blocks into more smaller methods.
- Fix an unnecessarily complicated pattern where the code would
create a `Function` in a local variable and then immediately
`apply` it exactly once... rather than just executing the code
normally.1 parent 27ebb14 commit f91f132
File tree
4 files changed
+856
-391
lines changed- server/src
- main/java/org/elasticsearch
- action
- admin/indices/rollover
- datastreams/autosharding
- common/settings
- test/java/org/elasticsearch/action/datastreams/autosharding
4 files changed
+856
-391
lines changedLines changed: 3 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 281 | + | |
| 282 | + | |
294 | 283 | | |
295 | 284 | | |
296 | 285 | | |
297 | | - | |
| 286 | + | |
298 | 287 | | |
299 | 288 | | |
300 | 289 | | |
| |||
0 commit comments