Skip to content

[release-8.0] Restore blob granule compatibility stubs for old multiversion clients - #14239

Merged
spraza merged 9 commits into
apple:release-8.0from
mengxu-oai:codex/fdb-blob-granule-stubs-release-8.0
Oct 14, 2026
Merged

spraza merged 9 commits into
apple:release-8.0from
mengxu-oai:codex/fdb-blob-granule-stubs-release-8.0

Conversation

@mengxu-oai

@mengxu-oai mengxu-oai commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Older multiversion clients resolve blob granule C functions during network setup. FoundationDB 8.0 removed those exports, so setup can fail even when the application only performs ordinary reads and writes.

This is a backport of PR #14238 to release-8.0.

Solution

Restore the 22 blob granule C exports required by the inspected 7.2, 7.3, and 7.4 multiversion loaders. Symbol lookup succeeds, but invoking any restored function prints its name and immediately aborts. The removed feature remains unsupported.

The backport includes the focused export and invocation tests, plus startup and read/write tests with older primary clients. The read/write smoke uses onError(), fresh transactions, and bounded transaction timeouts. It passes only if a successful commit and fresh readback finish within 10 seconds.

Testing

Passed on Linux x86_64 with Clang and warnings treated as errors:

  • Built and ran fdb_c_setup_tests: 1 test case and 6 assertions passed.
  • Ran fdb_c_blob_granule_fatal_exports after selecting API 730: all 22 exports were present, and every isolated invocation produced the expected diagnostic and SIGABRT.
  • Ran the full fdb_c_shim_library_tests suite against the built 8.0.1 server. The new 7.2.9, 7.3.79, and 7.4.8 primary-client cases all ran and passed network setup, a checked commit, and fresh readback with the backport external client and local database use disabled. The old libraries matched their public release checksums.
  • Verified the 7.3.79 primary library selection with a saved glibc binding log. The external copy matched the built backport library.
  • Ran the existing MixedApiWorkloadMultiThr.toml upgrade workload through the shim with an unmodified 7.3.79 primary, API 730, and three local server processes. The same tester process passed progress checks before and after the real server upgrade from 7.3.79 to 8.0.1, then exited cleanly. Client traces recorded selection of the old and backport external libraries.

The upgrade exercise checks mixed-workload progress across the restart. It does not validate every language binding or removed feature. Direct compatibility of an older binding with 8.0 as the primary library requires separate validation.

@saintstack

Copy link
Copy Markdown
Contributor

Here's some suggestions from local llm @mengxu-oai

  1. Release notes: the blob-granule bullet in documentation/sphinx/source/release-notes/release-notes-800.rst:28 should get the same sentence the tenant bullet above it has. That sentence says the C symbols kept for older bindings are stubs that abort the process when called.
  2. Stale TODO in fdb_c.h:236-241: it says to delete the blob-granule data types for 8.0.0. This PR now depends on two of them, FDBGranuleSummary and FDBReadBlobGranuleContext, in the stub signatures and the Python test. The TODO should say those two stay while the stubs exist, or whoever follows it will break the stubs.

Thanks

Comment thread bindings/c/foundationdb/fdb_c.h Resolved
@mengxu-oai
mengxu-oai marked this pull request as ready for review October 7, 2026 22:29
@mengxu-oai
mengxu-oai requested a review from spraza as a code owner October 7, 2026 22:29
@mengxu-oai

Copy link
Copy Markdown
Contributor Author

@saintstack ptal. It should have addressed the comment! Thanks for the improvement suggestions!

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@spraza

spraza commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

@mengxu-oai can you sync this PR with #14238?

@spraza
spraza requested a review from saintstack October 12, 2026 23:47
@mengxu-oai

Copy link
Copy Markdown
Contributor Author

@mengxu-oai can you sync this PR with #14238?

@spraza thanks for the reminder! just done! ptal.

@ploxiln ploxiln closed this Oct 13, 2026
@ploxiln ploxiln reopened this Oct 13, 2026
@ploxiln ploxiln changed the title Backport blob granule compatibility stubs to release-8.0 [release-8.0] Restore blob granule compatibility stubs for old multiversion clients Oct 13, 2026
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 1c949ba
  • Duration 0:38:16
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 1c949ba
  • Duration 0:53:50
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux RHEL 9

  • Commit ID: 1c949ba
  • Duration 1:05:39
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 1c949ba
  • Duration 1:39:40
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: 1c949ba
  • Duration 0:39:25
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: 1c949ba
  • Duration 1:28:27
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@spraza
spraza merged commit 51b06a6 into apple:release-8.0 Oct 14, 2026
12 checks passed
akshay-v-kaushik pushed a commit that referenced this pull request Nov 2, 2026
… the loader

The upgrade tests always load the current build's libfdb_c as the tester's
primary library, so the multi-version client code that loads the external
libraries is always the newest. An application still on an older release
runs that release's loader against the newer library, which no test covered.
8.0.0 shipped without blob granule exports that 7.x loaders require, and 7.x
applications failed in fdb_setup_network once 8.0.0 was added as an external
client (#14227, #14239).

Add --primary-version to upgrade_test.py: the shim-linked tester then loads
the given release's libfdb_c as its primary library, with the API version
capped at that release's. Register copies of the upgrade tests that use the
previous release as the primary library.
saintstack pushed a commit that referenced this pull request Nov 4, 2026
… the loader (#14417)

The upgrade tests always load the current build's libfdb_c as the tester's
primary library, so the multi-version client code that loads the external
libraries is always the newest. An application still on an older release
runs that release's loader against the newer library, which no test covered.
8.0.0 shipped without blob granule exports that 7.x loaders require, and 7.x
applications failed in fdb_setup_network once 8.0.0 was added as an external
client (#14227, #14239).

Add --primary-version to upgrade_test.py: the shim-linked tester then loads
the given release's libfdb_c as its primary library, with the API version
capped at that release's. Register copies of the upgrade tests that use the
previous release as the primary library.

(cherry picked from commit e4da558)
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.

5 participants