Skip to content

In proxy segment, apply proxied index changes with its operation version - #5581

Merged
timvisee merged 4 commits into
devfrom
proxy-segment-index-change-version
Dec 9, 2024
Merged

timvisee merged 4 commits into
devfrom
proxy-segment-index-change-version

Conversation

@timvisee

@timvisee timvisee commented Dec 4, 2024

Copy link
Copy Markdown
Member

Same as #5573, but for the proxied index changes as described here.

Index changes must be applied in order of their version, because low version changes will be rejected after a high version change. I've added a new struct holding all our index changes that ensures the changes are applied in correct order.

These changes are now also applied before point deletions. Point deletions also bump the segment version, so a point delete with a high version will reject an index change with a lower version if applied after.

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?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Keep track of index changes in a single map and keep track of the
operation version. Propagate this operation version when applying the
index change to ensure segments are properly flushed.
@timvisee
timvisee marked this pull request as ready for review December 4, 2024 09:48
@timvisee
timvisee merged commit 0b227d6 into dev Dec 9, 2024
@timvisee
timvisee deleted the proxy-segment-index-change-version branch December 9, 2024 12:10
timvisee added a commit that referenced this pull request Dec 9, 2024
…sion (#5581)

* Reimplement index change tracking in proxy segment, include version

Keep track of index changes in a single map and keep track of the
operation version. Propagate this operation version when applying the
index change to ensure segments are properly flushed.

* Add proxy changed indexes collection type that enforces index ordering

* Apply index changes before point deletions, add some debug assertions

* Minor improvements
@timvisee timvisee mentioned this pull request Dec 9, 2024
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.

3 participants