Skip to content

Use Custom Class instead of Tuple for Cached Byte Positions#68662

Merged
original-brownbear merged 2 commits intoelastic:masterfrom
original-brownbear:bytes-range
Feb 8, 2021
Merged

Use Custom Class instead of Tuple for Cached Byte Positions#68662
original-brownbear merged 2 commits intoelastic:masterfrom
original-brownbear:bytes-range

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

Just a suggestion, but IMO this is much simpler and makes enables some drier solutions for the cache file math down the line:

Using Tuple all over is somewhat read to read and forces us to duplicate
a lot of assertions. Using a custom class dries up the assertions and makes
the code easier to follow by adding utilities for some common region math spots.

Using `Tuple` all over is somewhat read to read and forces us to duplicate
a lot of assertions. Using a custom class dries up the assertions and makes
the code easier to follow by adding utilities for some common region math spots.
@original-brownbear original-brownbear added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs v8.0.0 v7.12.0 labels Feb 8, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Feb 8, 2021
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Tanguy!

@original-brownbear original-brownbear merged commit b29fe24 into elastic:master Feb 8, 2021
@original-brownbear original-brownbear deleted the bytes-range branch February 8, 2021 15:09
original-brownbear added a commit that referenced this pull request Feb 8, 2021
…68709)

Using `Tuple` all over is somewhat read to read and forces us to duplicate
a lot of assertions. Using a custom class dries up the assertions and makes
the code easier to follow by adding utilities for some common region math spots.
@original-brownbear original-brownbear restored the bytes-range branch April 18, 2023 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Meta label for distributed team. v7.12.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants