Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify source piece & data handling during object retrieval #3301

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

teor2345
Copy link
Member

This PR:

  • removes an unnecessary re-allocation when retrieving object data
  • removes the PieceIndex::source_ratio() method and its integer ratio assumption

As part of this change, more piece and segment index methods become const.

Code contributor checklist:

@teor2345 teor2345 added the improvement it is already working, but can be better label Dec 10, 2024
@teor2345 teor2345 self-assigned this Dec 10, 2024
Copy link
Member

@nazar-pc nazar-pc left a comment

Choose a reason for hiding this comment

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

The math is a bit tricky, bit appears to be correct. Though I would appreciate some quick unit tests. Will merge into the base branch and squash because I don't like the fix in the base branch and this one fixes my concerns completely.

@nazar-pc nazar-pc merged commit e5fb80a into fix-multi-piece Dec 10, 2024
8 checks passed
@nazar-pc nazar-pc deleted the refactor-piece-handling branch December 10, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement it is already working, but can be better
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants