Skip to content

Fix downgrade and following upgrade #7950

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

manaldush
Copy link
Contributor

@manaldush manaldush commented Apr 3, 2025

In case of citus downgrade and further upgrade citus crash with core dump.
The reason is that citus hardcoded number of columns in pg_dist_partition table,
but in case of downgrade and following update table can have more columns, and
some of then can be marked as dropped.

Patch suggest decision for this problem with using tupleDescriptor->nattrs(postgres internal approach).

Fixes #7933.

@manaldush
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 95.19231% with 5 lines in your changes missing coverage. Please review.

Project coverage is 80.76%. Comparing base (1dc60e3) to head (2281fb9).
Report is 2 commits behind head on main.

❌ Your project check has failed because the head coverage (80.76%) is below the target coverage (87.50%). You can increase the head coverage or adjust the target coverage.

❗ There is a different number of reports uploaded between BASE (1dc60e3) and HEAD (2281fb9). Click for more details.

HEAD has 77 uploads less than BASE
Flag BASE (1dc60e3) HEAD (2281fb9)
16_regress_check-pytest 1 0
15_citus_upgrade 1 0
15_regress_check-pytest 1 0
17_regress_check-pytest 1 0
15_17_upgrade 1 0
15_16_upgrade 1 0
16_17_upgrade 1 0
16_regress_check-columnar-isolation 1 0
17_regress_check-columnar-isolation 1 0
16_regress_check-follower-cluster 1 0
15_regress_check-columnar-isolation 1 0
15_regress_check-follower-cluster 1 0
17_regress_check-follower-cluster 1 0
15_regress_check-enterprise-isolation-logicalrep-3 1 0
16_regress_check-enterprise-isolation-logicalrep-3 1 0
16_regress_check-columnar 1 0
15_regress_check-enterprise-isolation-logicalrep-2 1 0
17_regress_check-enterprise-isolation-logicalrep-3 1 0
16_regress_check-enterprise-failure 1 0
17_regress_check-enterprise-failure 1 0
17_regress_check-enterprise-isolation-logicalrep-2 1 0
16_regress_check-split 1 0
17_regress_check-split 1 0
15_regress_check-split 1 0
15_regress_check-columnar 1 0
15_regress_check-enterprise-failure 1 0
17_regress_check-query-generator 1 0
16_regress_check-vanilla 1 0
16_regress_check-enterprise 1 0
15_regress_check-query-generator 1 0
15_regress_check-enterprise 1 0
17_regress_check-enterprise 1 0
17_regress_check-vanilla 1 0
15_regress_check-vanilla 1 0
16_arbitrary_configs_3 1 0
15_regress_check-enterprise-isolation 1 0
17_regress_check-enterprise-isolation 1 0
16_regress_check-enterprise-isolation 1 0
16_regress_check-enterprise-isolation-logicalrep-1 1 0
15_regress_check-enterprise-isolation-logicalrep-1 1 0
17_regress_check-failure 1 0
17_regress_check-multi-mx 1 0
16_regress_check-multi-mx 1 0
15_regress_check-failure 1 0
16_regress_check-failure 1 0
15_regress_check-multi-mx 1 0
17_regress_check-enterprise-isolation-logicalrep-1 1 0
17_cdc_installcheck 1 0
15_cdc_installcheck 1 0
17_arbitrary_configs_3 1 0
16_cdc_installcheck 1 0
16_regress_check-operations 1 0
15_regress_check-operations 1 0
17_regress_check-columnar 1 0
16_regress_check-enterprise-isolation-logicalrep-2 1 0
16_regress_check-query-generator 1 0
17_arbitrary_configs_2 1 0
16_regress_check-isolation 1 0
17_regress_check-isolation 1 0
16_arbitrary_configs_4 1 0
16_regress_check-multi 1 0
17_arbitrary_configs_0 1 0
17_arbitrary_configs_4 1 0
17_regress_check-multi 1 0
15_arbitrary_configs_5 1 0
15_arbitrary_configs_2 1 0
16_arbitrary_configs_5 1 0
15_arbitrary_configs_4 1 0
16_arbitrary_configs_2 1 0
16_regress_check-multi-1 1 0
15_regress_check-isolation 1 0
15_regress_check-multi 1 0
17_arbitrary_configs_5 1 0
15_arbitrary_configs_3 1 0
15_arbitrary_configs_1 1 0
16_arbitrary_configs_1 1 0
17_regress_check-operations 1 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7950      +/-   ##
==========================================
- Coverage   89.19%   80.76%   -8.43%     
==========================================
  Files         283      283              
  Lines       61053    60868     -185     
  Branches     7625     7566      -59     
==========================================
- Hits        54456    49163    -5293     
- Misses       4412     8918    +4506     
- Partials     2185     2787     +602     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@onurctirtir onurctirtir left a comment

Choose a reason for hiding this comment

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

@manaldush - you probably need to run make reindent to get the style checks passing.


@naisila / @thanodnl

Do you think could this introduce a perf regression? From my perspective, that "might" the case but also not quite sure ..

So, we should definitely do performance testing for this PR, but it could also wait until the release testing kicks in.

What do you think?


@alperkocatas, could you test this on your Mac once you have some time for it?

@manaldush
Copy link
Contributor Author

@onurctirtir re-run make reindent and commit changes

@onurctirtir
Copy link
Member

@onurctirtir re-run make reindent and commit changes

Thank you! Let's wait for others to chime in a bit.

@onurctirtir
Copy link
Member

Oh, seems some of the regression tests are failing. Could you look to see why it's the case @manaldush?

From https://github.com/citusdata/citus/actions/runs/14310120419?pr=7950, as an example, multi_cluster_management is failing. You can run this test locally as below (we of course need to fix others too):

cd src/test/regress/

# one time setup begins
pip install pipenv
pipenv --rm
pipenv install
# one time setup ends

pipenv shell

citus_tests/run_test.py multi_cluster_management --use-base-schedule --use-whole-schedule-line

Also see src/test/regress/README.md.

@manaldush
Copy link
Contributor Author

Oh, seems some of the regression tests are failing. Could you look to see why it's the case @manaldush?

From https://github.com/citusdata/citus/actions/runs/14310120419?pr=7950, as an example, multi_cluster_management is failing. You can run this test locally as below (we of course need to fix others too):

cd src/test/regress/

# one time setup begins
pip install pipenv
pipenv --rm
pipenv install
# one time setup ends

pipenv shell

citus_tests/run_test.py multi_cluster_management --use-base-schedule --use-whole-schedule-line

Also see src/test/regress/README.md.

@onurctirtir, found problem and fixed

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.

multi_extension fails on ubuntu 22.04 arm version
2 participants