Skip to content

Conversation

@morgando
Copy link
Contributor

@morgando morgando commented Nov 14, 2025

Fixes a deadlock where replication holds the schema lock but waits on a table lock, while snapshot SQL holds the table lock and waits on the schema lock. The solution is to populate the snapshot’s state before acquiring table locks.

(populate_modsnap_state(clnt) != 0)) {
rc = SQLITE_INTERNAL;
goto done;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue was that we already hold table locks at this point, and populate_modsnap_state then tried to grab the schema lock

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: Success ✓.
Smoke testing: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_race_timepart [setup core dumped]
logfill_logput_window_generated
sc_resume
analyze_partial_index_off_generated
consumer_non_atomic_default_consumer_generated
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql

@morgando
Copy link
Contributor Author

cdb2test Nov 14 16:10:04 2025 success snapshot_ddlk.R20251114.4

@morgando morgando force-pushed the snapshot_ddlk branch 7 times, most recently from 77ff774 to 736874e Compare November 17, 2025 23:08
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: Success ✓.
Smoke testing: Success ✓.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
analyze
consumer_non_atomic_default_consumer_generated
tunables
si_sc_race
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql

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: Success ✓.
Smoke testing: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

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: Success ✓.
Smoke testing: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_partial_datacopy_logicalsc_generated
incoherent_startup
consumer_non_atomic_default_consumer_generated
sc_transactional_rowlocks_generated
truncatesc_offline_generated
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql

@morgando
Copy link
Contributor Author

mdouglas47 Nov 19 14:14:51 2025 success snapshot_ddlk.R20251119.2

@morgando morgando merged commit 1785421 into bloomberg:main Nov 20, 2025
4 checks passed
@morgando morgando deleted the snapshot_ddlk branch November 20, 2025 19:29
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.

3 participants