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

fix potential endless loop in merge #2457

Merged
merged 1 commit into from
Jul 30, 2024
Merged

fix potential endless loop in merge #2457

merged 1 commit into from
Jul 30, 2024

Conversation

PSeitz
Copy link
Contributor

@PSeitz PSeitz commented Jul 24, 2024

avoid single segments lists without deletes as merge candidates, as they will be moved
to a merge operation and filtered for merging in the next
consider_merge_options call. In rare cases this may end up in a endless
merge loop where only single segments where nothing is to be done are
merged.

#2454

As alternative we could say the merge policy would need to handle that.

avoid single segments lists without deletes as merge candidates, as they will be moved
to a merge operation and filtered for merging in the next
consider_merge_options call. In rare cases this may end up in a endless
merge loop where only single segments where nothing is to be done are
merged.
@PSeitz PSeitz requested a review from fulmicoton July 24, 2024 05:48
@patrik-simunic-cz
Copy link

I can confirm that this seems to have solved both the possibly infinite loop and (even rarer case of) finishing successfully yet merge policy not taking effect due to not ever being called with 2 merge candidates.

@PSeitz PSeitz merged commit 3f6d225 into main Jul 30, 2024
4 checks passed
@PSeitz PSeitz deleted the check_merge branch July 30, 2024 08:37
philippemnoel pushed a commit to paradedb/tantivy that referenced this pull request Aug 31, 2024
avoid single segments lists without deletes as merge candidates, as they will be moved
to a merge operation and filtered for merging in the next
consider_merge_options call. In rare cases this may end up in a endless
merge loop where only single segments where nothing is to be done are
merged.
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