Commit 3a8ac86
committed
ES-10037 Periodic logging in autosharding service
This enhances `DataStreamAutoShardingService` so that it periodically
logs at `INFO` level the most 'interesting' results it has produced in
the last period.
In this PR, the most 'interesting' results are considered to be the
ones with the highest load, keeping track separately of the top 10
which resulting in an increase decision and the top 10 which did
not. In practice, increase recommendations are sufficiently rare that
the top 10 will often be 'all of them', and they are all potentially
interesting (but we cap it to protect against taking up an unbounded
amount of memory). We keep the high load non-increase recommendations
as well, since these are likely to be the interesting ones to look at
when investigating why some data stream did not get an increase shards
recommendation when we might have expected it.
The mechanism would be easily extended to add in other categories.
The existing `DEBUG` and `TRACE` log lines in the service are replaced
with a single `DEBUG` log which pulls together all the data. This is
an improvement, since at the moment it is hard to figure out from the
logs which lines refer to the same data stream (they are interleaved,
and don't all include the data stream name).
The write load field in the `AutoShardingResult` was unused, and is
removed.1 parent 483f979 commit 3a8ac86
File tree
5 files changed
+774
-229
lines changed- server/src
- main/java/org/elasticsearch/action/datastreams/autosharding
- test/java/org/elasticsearch/action
- admin/indices/rollover
- datastreams/autosharding
5 files changed
+774
-229
lines changedLines changed: 32 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 28 | + | |
35 | 29 | | |
36 | 30 | | |
37 | 31 | | |
| |||
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
56 | | - | |
57 | | - | |
| 50 | + | |
58 | 51 | | |
59 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
60 | 82 | | |
0 commit comments