Limit ByteSizeUnit to 2 decimals (#120142)

* Exhaustive testParseFractionalNumber

* Refactor: encapsulate ByteSizeUnit constructor

* Refactor: store size in bytes

* Support up to 2 decimals in parsed ByteSizeValue

* Fix test for rounding up with no warnings

* ByteSizeUnit transport changes

* Update docs/changelog/120142.yaml

* Changelog details and impact

* Fix change log breaking.area

* Address PR comments
This commit is contained in:
Patrick Doyle 2025-01-16 14:30:23 -05:00 committed by GitHub
parent 1515898e8c
commit 34059c9dbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
119 changed files with 663 additions and 510 deletions

View file

@ -81,8 +81,8 @@ class DownsampleShardIndexer {
private static final Logger logger = LogManager.getLogger(DownsampleShardIndexer.class);
public static final int DOWNSAMPLE_BULK_ACTIONS = 10000;
public static final ByteSizeValue DOWNSAMPLE_BULK_SIZE = new ByteSizeValue(1, ByteSizeUnit.MB);
public static final ByteSizeValue DOWNSAMPLE_MAX_BYTES_IN_FLIGHT = new ByteSizeValue(50, ByteSizeUnit.MB);
public static final ByteSizeValue DOWNSAMPLE_BULK_SIZE = ByteSizeValue.of(1, ByteSizeUnit.MB);
public static final ByteSizeValue DOWNSAMPLE_MAX_BYTES_IN_FLIGHT = ByteSizeValue.of(50, ByteSizeUnit.MB);
private final IndexShard indexShard;
private final Client client;
private final DownsampleMetrics downsampleMetrics;