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 deadlock during autoanalyze of partitioned table #5006

Draft
wants to merge 3 commits into
base: 8.0
Choose a base branch
from

Conversation

morgando
Copy link
Contributor

@morgando morgando commented Feb 7, 2025

Deadlock:

  1. analyze parent thread acquired views read lock and then blocked on the analyze child thread
  2. partition rollout thread acquired schema write lock
  3. analyze child thread blocked trying to acquire schema read lock
  4. partition rollout thread blocked trying to acquire views write lock

Fix by having parent thread release holding views lock before blocking on analyze child thread.

Copy link

@roborivers roborivers left a comment

Choose a reason for hiding this comment

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

Coding style check: Error. ⚠.
Smoke testing: Success ✓.
Cbuild submission: Success ✓.
Regression testing: 5/567 tests failed ⚠.

The first 10 failing tests are:
logfill
phys_rep_perf
sp_twofiles_generated
incremental_backup_load
truncatesc_offline_generated

Signed-off-by: Morgan Douglas <[email protected]>

Tweak

Signed-off-by: Morgan Douglas <[email protected]>
Signed-off-by: Morgan Douglas <[email protected]>
Signed-off-by: Morgan Douglas <[email protected]>

cdb2sql ${CDB2_OPTIONS} ${DBNAME} default "create table t(i int) partitioned by time period 'daily' retention 2 start '9223372036854775807'"
cdb2sql ${CDB2_OPTIONS} ${DBNAME} default "insert into t values(1)"
cdb2sql ${CDB2_OPTIONS} ${DBNAME} default "exec procedure sys.cmd.send(debug_sleep_on_partition_analyze 5)" &
Copy link
Contributor Author

Choose a reason for hiding this comment

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

dont run this in bg

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.

2 participants