Remove the FoundationDB consensus and timestamp oracle backends - #38706
Conversation
FoundationDB was wired in behind a `foundationdb` cargo feature as an alternative persist consensus and timestamp oracle backend, with a supporting `mz-foundationdb` crate, an mzcompose server image, CI jobs, and a `libfdb_c.so` copy in all three production base images. Nothing depends on it, and linking the FoundationDB C client into testdrive, environmentd and clusterd carries a teardown hazard: the contract in `mz-foundationdb` requires dropping every `Database` and transaction handle and then calling `shutdown_network()` before exit, but the `NetworkAutoStop` guard lived in a `static` that Rust never drops, so `fdb_stop_network` never ran and the C network thread outlived Rust teardown. That surfaced as glibc heap corruption aborting testdrive at process exit. Removing the backends drops the hazard along with the maintenance cost of the client pin, which was coupled across three Dockerfiles, a Homebrew cross-compilation formula, and the crate's API feature. Closes: PER-82 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ETNBVh4CrGA53FJTNS9m4v
|
Evidence that it is not this PR's:
No fix exists to port. Someone with Buildkite access should check the annotation; if it names a real regression I'll take it. Generated by Claude Code |
|
Read the annotation now that I have Buildkite access. The failure is SS-415, open and labelled Test Blocker: That panic killed SS-415's own description already lists build 133929 among its occurrences, alongside five other unrelated branches in the past week. The panic is in Retried the job once: Checks parallel 2. Generated by Claude Code |
|
Thanks for the reviews! |
FoundationDB was wired in behind a
foundationdbcargo feature as an alternative persist consensus and timestamp oracle backend, with a supportingmz-foundationdbcrate, an mzcompose server image, CI jobs, and alibfdb_c.socopy in all three production base images.Nothing depends on it, and linking the FoundationDB C client into testdrive, environmentd and clusterd carries a teardown hazard: the contract in
mz-foundationdbrequires dropping everyDatabaseand transaction handle and then callingshutdown_network()before exit, but theNetworkAutoStopguard lived in astaticthat Rust never drops, sofdb_stop_networknever ran and the C network thread outlived Rust teardown. That surfaced as glibc heap corruption aborting testdrive at process exit.Removing the backends drops the hazard along with the maintenance cost of the client pin, which was coupled across three Dockerfiles, a Homebrew cross-compilation formula, and the crate's API feature.
Description
Deleted: the
mz-foundationdbcrate,FdbConsensus,FdbTimestampOracle, thetest/foundationdbcomposition and server image, the mzcomposeFoundationDBservice,doc/developer/foundationdb.md, and the-foundationdbdependency-lint ground truth files.Unwired: the
foundationdbfeature from persist, persist-client, timestamp-oracle, adapter, clusterd, environmentd, materialized and testdrive; the workspace member and thefoundationdbworkspace dependency; theConsensusConfig::FoundationDBandTimestampOracleConfig::Fdbvariants and their URL schemes; thelibfdb_c.soCOPY from the three prod base images; the client.debfrom the CI builder; thelibfdb-c-*Homebrew formula fromxcompile.py; the nightlytestdrive-fdbandfdbpipeline steps; the FDB service and cluster-file plumbing in the cargo-test composition;bin/run --foundationdb; and the nextest retry overrides for the FDB unit tests.futures-utilis dropped frommz-timestamp-oraclealong with itsunused-depsignore, since only the FDB oracle used it.Cargo.lockloses only thefoundationdb*crates and their exclusive transitive dependencies, with no version changes elsewhere.doc/developer/design/20220404_metadata_storage.mdstill mentions FoundationDB as an option weighed at the time; it is left as the historical record it is.Verification
cargo check --workspace,bin/fmt --checkandbin/lint-cargopass. No tests were added or modified; the FDB-specific unit tests are removed with the code they covered.Closes: PER-82
🤖 Generated with Claude Code
https://claude.ai/code/session_01ETNBVh4CrGA53FJTNS9m4v
Generated by Claude Code