forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto sharding uses the sum of shards write loads
Data stream auto sharding uses the index write load to decide the optimal number of shards. We read this previously from the indexing stats output, using the `total/write_load` value however, this proved to be wrong as that value takes into account the search shard write load (which will always be 0). Even more, the `total/write_load` value averages the write loads for every shard so you can end up with indices that only have one primary and one replica, with the primary shard having a write load of 1.7 and the `total/write_load` reporting to be `0.8`. For data stream auto sharding we're interested in the **total** index write load, defined as the sum of all the shards write loads (yes we can include the replica shard write loads in this sum as they're 0). This PR changes the rollover write load computation to sum all the shard write loads for the data stream write index, and in the `DataStreamAutoShardingService` when looking at the historic write load over the cooldown period to, again, sum the write loads of every shard in the index metadata/stats.
- Loading branch information
Showing
3 changed files
with
14 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters