db: improve patchset matching by enforcing version and index checks, and allowing cross-thread merges for complementary series #132
Closed
captain5050 wants to merge 0 commit into
Closed
Conversation
Member
|
Hey! Thanks for the PR! How it was tested? I suggest running it with --no-ai and pulling like 100k or 1M messages from various mailing lists and see how it will perform. I've seen many examples when the version tag is set only on the cover letter or not set on the cover letter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces two critical improvements to the patchset matching and merging engine in
Database::create_patchsetto guarantee accurate series isolation across versions and threads:1. Strict Candidate Validation in
cover_letter_message_idMatching LoopFixes a bug where distinct versions (e.g., v1 vs v2) or colliding patch indices were incorrectly merged into the same patchset when matched by
cover_letter_message_id.2. Relax Thread Isolation for Incomplete Complementary Patchsets
Addresses the problem where resending the remaining patches of a large series (e.g., due to a
git send-emailfailure) in a new thread created a separate incomplete series.thread_compatiblecheck to allow cross-thread matching when the candidate series is incomplete (existing_received < existing_total) and there is no index collision.Both changes have been fully verified with the new
tests/cover_letter_version_merge_test.rsandtests/cross_thread_complementary_merge_test.rsintegration tests. All existing tests are fully passing.