Relax version check
Relaxes the Citus version compatibility check for asynchronous replica upgrades.
Citus requires the loaded shared library and the installed extension to have identical major and minor versions. This change keeps the library vs. control-file version checks the same (a restart is still needed after upgrading the library), but allows the installed extension to differ by at most one minor version from the loaded library.
With this relaxation in place, replicas can lag by a single minor version during phased upgrades without triggering a version mismatch for distributed queries.
Tested the change on release branch 13.2 as main already points to the next major version. Versioned test capability from https://github.com/citusdata/citus/pull/8361 is used in test.
See branch for test https://github.com/citusdata/citus/tree/eag/release-13.2/relax-test , the so and sql versions are 13.2-1.
// Create extension fails
CITUSVERSION=13.0-1 citus_tests/run_test.py adaptive_executor
....
CREATE DATABASE
ERROR: specified version incompatible with loaded Citus library
DETAIL: Loaded library requires 13.2, but 13.0-1 was specified.
HINT: If a newer library is present, restart the database and try the command again.
....
// Test proceeds as expected
CITUSVERSION=13.1-1 citus_tests/run_test.py adaptive_executor
CREATE DATABASE
CREATE EXTENSION
CREATE FUNCTION
// Test proceeds as expected
CITUSVERSION=13.2-1 citus_tests/run_test.py adaptive_executor
CREATE DATABASE
CREATE EXTENSION
CREATE FUNCTION
Codecov Report
:x: Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 88.79%. Comparing base (84fc680) to head (52d0a0c).
:warning: Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8356 +/- ##
==========================================
- Coverage 88.80% 88.79% -0.01%
==========================================
Files 287 287
Lines 63111 63144 +33
Branches 7907 7912 +5
==========================================
+ Hits 56044 56067 +23
- Misses 4745 4751 +6
- Partials 2322 2326 +4
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.