Skip to content

Conversation

@prdoyle
Copy link
Contributor

@prdoyle prdoyle commented Feb 19, 2025

This allows fractional units, like 1.1KB, to be preserved across the transport protocol instead of turning into 1126B.

This should be backported to 9.0 but the transport versions there are out of sync with main so I'll hold off until I can coordinate with them.

See ES-10585.

@prdoyle prdoyle self-assigned this Feb 19, 2025
@prdoyle prdoyle requested a review from a team as a code owner February 19, 2025 20:22
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Feb 19, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@prdoyle prdoyle enabled auto-merge (squash) February 20, 2025 21:45
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine but let's be consistent with the style of other transport version checks.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

);
for (var tv : List.of(TransportVersion.current(), BYTE_SIZE_VALUE_ALWAYS_USES_BYTES, BYTE_SIZE_VALUE_ALWAYS_USES_BYTES_90)) {
for (var desiredUnit : ByteSizeUnit.values()) {
if (desiredUnit == ByteSizeUnit.BYTES) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we skip bytes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't have a fraction of a byte, but you can have a fraction of any other unit.

@prdoyle prdoyle merged commit 061c0ca into elastic:main Feb 21, 2025
17 checks passed
@rjernst rjernst deleted the es-10585 branch February 21, 2025 15:23
@rjernst rjernst restored the es-10585 branch February 21, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants