Skip to content

Restore blob granule stubs for older multiversion clients - #14238

Open
mengxu-oai wants to merge 5 commits into
apple:mainfrom
mengxu-oai:codex/fdb-blob-granule-stubs-main
Open

mengxu-oai wants to merge 5 commits into
apple:mainfrom
mengxu-oai:codex/fdb-blob-granule-stubs-main

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 follows the compatibility discussion in PR #14227.

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.

Use direct exports because the invocation contract is identical for every API version. Preserve the historical signatures and platform export visibility.

Strengthen the shim tests to verify the selected primary client and retry transaction errors through onError() with fresh transactions and bounded timeouts. The test passes only if a successful commit and fresh readback finish within 10 seconds. Add coverage for unmodified 7.2, 7.3, and 7.4 primary clients using the current external client.

Backport to release-8.0: PR #14239.

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. 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 current external client and local database use disabled. The old libraries matched their public release checksums.
  • Verified the 7.3.79 primary library selection with glibc binding logs. The external copy matched the built current 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.0, then exited cleanly. Client traces recorded selection of the old and current 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.

@mengxu-oai mengxu-oai changed the title Restore blob granule stubs for older multiversion clients [Do not review yet]Restore blob granule stubs for older multiversion clients Oct 7, 2026
Comment thread bindings/c/test/fdb_c_blob_granule_fatal_exports.py
@mengxu-oai mengxu-oai changed the title [Do not review yet]Restore blob granule stubs for older multiversion clients Restore blob granule stubs for older multiversion clients Oct 7, 2026
@mengxu-oai
mengxu-oai marked this pull request as ready for review October 7, 2026 06:30
@mengxu-oai

Copy link
Copy Markdown
Contributor Author

@spraza can you pls take a look at this change?
I'm ok with removing the testing part from this patch and moving it to a different PR to test similar issues in upgrade

@spraza spraza left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mostly LGTM, thanks.

One callout is this TODO in fdb_c.h needs updating:

/*
 * TODO: delete the following "blob granule" and "tenant" related data types
 * when we are sure it's safe to do so.
 *
 * These features were always experimental and have now been removed, so probably
 * the data structures can be done away with also for the FDB 8.0.0 release.
 */

Once you do that, I can accept the PR.

Edit: looks like Michael also had a similar comment: #14239 (comment). That also talks about release notes.

@mengxu-oai

Copy link
Copy Markdown
Contributor Author

Mostly LGTM, thanks.

One callout is this TODO in fdb_c.h needs updating:

/*
 * TODO: delete the following "blob granule" and "tenant" related data types
 * when we are sure it's safe to do so.
 *
 * These features were always experimental and have now been removed, so probably
 * the data structures can be done away with also for the FDB 8.0.0 release.
 */

Once you do that, I can accept the PR.

Edit: looks like Michael also had a similar comment: #14239 (comment). That also talks about release notes.

thanks! Fixed.

@mengxu-oai

Copy link
Copy Markdown
Contributor Author

@spraza ptal. Thanks for your suggestions! It also resolve Michael's comments.

Comment on lines +28 to +30
and commands. The blob granule C symbols retained for older multiversion
clients to load are stubs that **abort the process when called**; they do not
preserve blob granule functionality. Native CDC is a separate interface, not

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The blob granule stubs (this PR) will go as part of 8.0.1. Can you revert the 8.0.0 change here, add 8.0.1 above and basically describe the bug fix you're making? Just make sure to use the existing release note format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done. ptal @spraza, thanks!

@spraza spraza left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing this

IMPLIBSO_ERROR_CODE = -6 # SIGABORT
CLIENT_CLEANUP_TIMEOUT_SEC = 5
LEGACY_PRIMARY_TIMEOUT_SEC = 30
LEGACY_PRIMARY_VERSIONS = ("7.2.9", "7.3.79", "7.4.8")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I might consider testing 7.1.59 but skipping 7.2.x which I think was not much used

@mengxu-oai

Copy link
Copy Markdown
Contributor Author

@spraza can you help check why CI is stuck?

@saintstack saintstack closed this Oct 10, 2026
@saintstack saintstack reopened this Oct 10, 2026
@foundationdb-ci

Copy link
Copy Markdown
Contributor

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

  • Commit ID: f5a0d16
  • Duration 0:21:33
  • 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-m1 on macOS 14.x

  • Commit ID: f5a0d16
  • Duration 0:35:57
  • 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 on Linux RHEL 9

  • Commit ID: f5a0d16
  • Duration 0:48:04
  • 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: f5a0d16
  • Duration 0:48:34
  • 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: f5a0d16
  • Duration 0:58:03
  • 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: f5a0d16
  • Duration 1:12:45
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login ./build_pr_macos.sh. Reason: exit status 8
  • 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: f5a0d16
  • Duration 1:43:54
  • 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)

This branch has not been deployed

No deployments
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