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

On read operations, go over non-appendable segments first #3996

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

timvisee
Copy link
Member

@timvisee timvisee commented Apr 9, 2024

Extends #3995

All segment reading operations must read over non-appendable segments first.

Points may be moved from non-appendable to appendable, because we don't lock all segments together read ordering is very important here.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

@timvisee timvisee marked this pull request as ready for review April 10, 2024 07:48
@timvisee timvisee requested a review from generall April 10, 2024 07:49
self.segments
.values()
.cloned()
.partition(|segment| !segment.get().read().is_appendable())
Copy link
Contributor

Choose a reason for hiding this comment

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

👨‍🍳🤌

@timvisee timvisee merged commit 107c985 into dev Apr 10, 2024
17 checks passed
timvisee added a commit that referenced this pull request Apr 22, 2024
* On read operations, go over non-appendable segments first

* Read segments in two "phases" (first non-appendable, then appendable) during read operations

* Resolve clippy warnings

* Collect non-appendable and appendable segments in single pass

* Minor cleanup

---------

Co-authored-by: Roman Titov <ffuugoo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants