Draft: Allow selective sync by orgs for Merge Request Diff
What does this MR do and why?
This change improves how GitLab's Geo replication system handles merge request diffs (the code changes in merge requests) across different GitLab instances.
The main improvements include:
-
Better selective sync support: Added a new
verifiablesmethod that determines which merge request diffs should be checksummed and replicated based on whether the system is running on a primary or secondary GitLab instance. -
Enhanced filtering logic: Updated the
selective_sync_scopemethod to be more efficient when filtering which diffs to sync, especially when dealing with large datasets. It now better handles cases where only specific ranges of records need to be processed. -
Improved replication method: Enhanced
replicables_for_current_secondaryto work better with the selective sync feature, ensuring secondary instances only receive the diffs they actually need. -
Test reorganization: Restructured the test file to better organize Geo-related tests under a dedicated section, making the code more maintainable and adding comprehensive test coverage for the new selective sync behavior.
These changes make GitLab's Geo replication more efficient by ensuring that secondary instances only sync and verify the merge request diffs that are relevant to them, reducing unnecessary network traffic and storage usage.
References
- Related to #534161
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.