Skip to content

storage: make MySQL snapshot wait_timeout a configurable system var#37875

Open
peterdukelarsen wants to merge 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/mysql-wait-timeout-flag
Open

storage: make MySQL snapshot wait_timeout a configurable system var#37875
peterdukelarsen wants to merge 1 commit into
MaterializeInc:mainfrom
peterdukelarsen:pl/mysql-wait-timeout-flag

Conversation

@peterdukelarsen

@peterdukelarsen peterdukelarsen commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Motivation

Part of SS-97.

We hold connections open while getting the count, read locks, and partitions (if enabled) on mysql snapshot. I've been playing around with Materialize and MySQL with a big table ~1B rows and this first step takes ~1.7 hours to grab the counts and partitions. I think we should make this configurable in case this becomes a limiting factor for giant tables.

Description

Makes the snapshot wait timeout configurable via launch darkly.

Verification

@peterdukelarsen
peterdukelarsen requested review from a team as code owners July 24, 2026 18:17
Replace the hardcoded 28800 second wait_timeout on idle MySQL snapshot
connections with a new mysql_source_snapshot_wait_timeout system
parameter, joining the other MySQL source timeouts that are
synchronized from LaunchDarkly. The default remains 28800 seconds, the
MySQL server default. Values outside the valid server range of
[1, 31536000] fall back to the default, matching how the sibling
timeouts are validated in TimeoutConfig::build.

Extends the mysql-cdc testdrive file with a smoke test that sets the
parameter and snapshots a source under it. The parameter is also added
to the LaunchDarkly flag consistency allowlist alongside its siblings
until flags for this family exist.
@peterdukelarsen
peterdukelarsen force-pushed the pl/mysql-wait-timeout-flag branch from e7d9b50 to b8a090b Compare July 24, 2026 18:20
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.

1 participant