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

Keep source index in Merger #52

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Conversation

dureuill
Copy link
Contributor

@dureuill dureuill commented Apr 9, 2024

Pull Request

Related issue

Might help with https://github.com/meilisearch/meilisearch-support/issues/138 (internal link)

What does this PR do?

  • Some insertions that Meilisearch performs needs their order preserved. Currently grenad is not guaranteeing order preservation for operations on equal keys.
  • This PR adds the index of each source from the original arrays of sources. As sources are sorted by order of insertions, breaking ties on keys with that source index preserves operation order.

@dureuill dureuill requested a review from Kerollmops April 9, 2024 07:23
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

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

Easy and perfect fix! Thank you @dureuill 👏
bors merge

@Kerollmops Kerollmops merged commit f0db5f3 into main Apr 9, 2024
3 of 4 checks passed
@Kerollmops Kerollmops deleted the keep-source-index-in-merger branch April 9, 2024 07:36
meili-bors bot added a commit to meilisearch/meilisearch that referenced this pull request Apr 10, 2024
4562: Update grenad to fix rare DB corruption r=Kerollmops a=dureuill


Fixes https://github.com/meilisearch/meilisearch-support/issues/138 (internal link)

See meilisearch/grenad#52

Co-authored-by: Louis Dureuil <louis@meilisearch.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.

2 participants