Skip to content

Pin chdb-core v26.11.0-rc.2 - #65

Merged
wudidapaopao merged 5 commits into
chdb-io:mainfrom
wudidapaopao:bump-engine-v26.11.0-rc.1
Nov 5, 2026
Merged

wudidapaopao merged 5 commits into
chdb-io:mainfrom
wudidapaopao:bump-engine-v26.11.0-rc.1

Conversation

@wudidapaopao

@wudidapaopao wudidapaopao commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the engine pin from chdb-core v26.9.2-rc.2 to v26.11.0-rc.2 (ClickHouse baseline master def2fdf4caa, 26.11.1.1). This PR first pinned v26.11.0-rc.1; rc.2 is rc.1 plus chdb-core#312, which fixes chdb_shutdown after MergeTree use, the one-shot API, leftover output after a failed query and the exit teardown. Besides the pin, it adapts one static-linking test to the new Linux archive layout, adds a runtime case for shutting down after MergeTree merges, and corrects the runtime::shutdown docs about a plain process exit.

This is a release candidate, taken to validate the engine. It is not on PyPI, and the full release will be v26.11.1. The crate's release gate in Cargo.toml still holds: do not publish against this pin.

Changes

  • Pin. The same three edits the release check's propose_bump step makes:

    • CHDB_ENGINE_PIN in update_libchdb.sh
    • CHDB_ENGINE_PIN in build.rs
    • engine under [package.metadata.chdb] in Cargo.toml, plus the comment that names the pin

    .github/scripts/check-engine-pin.sh passes. The repo stores no checksums. I checked the downloaded rc.2 assets against the release's SHA256SUMS, and all matched: linux-x86_64-libchdb.tar.gz, linux-x86_64-libchdb-static.tar.gz, linux-aarch64-libchdb-static.tar.gz and macos-arm64-libchdb-static.tar.gz. rc.2's chdb.h differs from rc.1's only in CHDB_VERSION, and is ABI-identical to the previous pin's.

  • tests/bundled_runtime_hidden.rs. Since chdb-core#261, the Linux libchdb.a is prelinked by ld -r into one object, libchdb.o, and only the C API stays global. That fixes Static linking breaks backtrace #53. The archive no longer has libcxx__/libcxxabi__/libunwind__ members, so the test failed as it was written to: "no runtime members" means it is checking nothing.

    • For a Linux archive without runtime members, the test now reads the whole symbol table.
    • It requires one definition from each bundled runtime: _ZNSt3__15mutex4lockEv, __cxa_throw and _Unwind_RaiseException. A missing runtime or a stripped symbol table therefore cannot pass.
    • It then asserts that no GLOBAL/WEAK/UNIQUE definition, at any visibility, has a C++ runtime name (reserved _-prefixed or unw_*).
    • The macOS archive keeps the member layout: 59 runtime members, 0 visible. So the member check is unchanged there, and for older Linux engines.
    • rc.2's archives measure the same as rc.1's: 68 global definitions, all C API, on linux-x86_64 and linux-aarch64, and 0 visible among 59 runtime members on macOS arm64.
  • tests/runtime_faces.rs: new case shutdown_after_mergetree_merges. It writes twenty parts to a MergeTree table in a session, drops the session while the background merges have work, calls runtime::shutdown() and exits. On rc.1, chdb_shutdown refused here ("global thread pool did not become idle"); chdb-core#312 fixed that. The case fails against the rc.1 library (EngineCallFailed, exit status 101) and passes against rc.2.

  • runtime::shutdown docs (src/runtime.rs, docs/examples.md). They said a process that simply exits does not need it. It does: exiting with a connection still open while MergeTree merges run can crash the process at exit, which the rc.2 release notes also say. The docs now say to drop every connection before the process exits and to call shutdown after the last one. They also name the two ways a Rust program keeps a connection open at exit: std::process::exit runs no destructors, and a connection held in a static is never dropped. A stale chdb.h line reference in a code comment is replaced by the function it pointed at.

No other binding code changes.

Verification (local, Linux x86_64, Rust 1.97.0, against rc.2)

Dynamic. ./update_libchdb.sh --local was used (the tarball it downloaded matches SHA256SUMS), then LD_LIBRARY_PATH pointed at the repo root, instead of --global, which needs sudo:

  • cargo fmt --check: pass
  • cargo clippy --all-targets -- --deny warnings: pass
  • cargo build --verbose: pass
  • cargo test -- --test-threads=1, run twice: all pass both times, including the 16 runtime_faces cases and the 64 doc tests
  • cargo test --features durable -- --test-threads=1: all pass except the known heartbeat flake (see Notes)
  • cargo test --features durable-s3 --lib -- --test-threads=1 durable::backends: 20 passed
  • All 16 examples, cargo run --features durable --example <name>: exit 0, nothing on stderr
  • build.rs download path (no local lib): tests/version.rs passes. That includes expected_and_reported_engine_versions_agree, which compares the build's 26.11.0-rc.2 with what the loaded library reports.
  • shutdown_after_mergetree_merges against the rc.1 library fails as intended; against rc.2 it passed 15 of 15 runs.

Static. These are the same steps as the CI static job, with no libchdb installed; build.rs fetched the rc.2 archive, whose libchdb.a is byte-identical to the checked asset:

  • cargo clippy --all-targets --all-features -- --deny warnings: pass
  • cargo test --features static --no-run --tests: 17 binaries
  • check-static-link.sh: every binary carries the engine
  • Each binary run directly with --test-threads=1 < /dev/null: all pass, including the 16 runtime_faces cases
  • cargo test --features static --doc: 64 passed

Not verified locally

  • macOS (arm64/x86_64) and linux-aarch64 builds and test runs are left to CI. I inspected the aarch64 and macOS-arm64 static archives offline, and they have the layouts described above.
  • The real-bucket durable_s3 tests need credentials, so they were not run, same as in CI.

Notes

  • durable_conformance::a_heartbeat_running_through_commits_does_not_disturb_them failed with LeaseFenced in the rc.2 durable run, while the machine was under parallel load, and passed in 3 of 3 reruns of the durable_conformance binary. It also failed 2 of 7 runs against rc.1. The test uses FakeEngine with a 300 ms lease, so it never touches libchdb. It looks like an engine-independent timing flake, not a regression from this bump.
  • chdb-core's bindings.md still says to skip chdb_shutdown "if the process is simply exiting", which disagrees with chdb.h and with the rc.2 release notes. That file is in chdb-core, so it is not changed here.

🤖 Generated with Claude Code

Note

Pin chdb-core engine to v26.11.0-rc.2 and validate shutdown after MergeTree merges

  • Updates the engine pin from v26.9.2-rc.2 to v26.11.0-rc.2 in Cargo.toml, build.rs, and update_libchdb.sh
  • Documents that exiting with an open connection during MergeTree merges can crash the process; readers are told to drop all connections before calling runtime::shutdown (src/runtime.rs, docs/examples.md)
  • Adds a shutdown_after_mergetree_merges integration case that inserts 200,000 rows into a MergeTree table, drops the session, then shuts down (tests/runtime_faces.rs)
  • Extends the archive test to handle a Linux prelinked runtime object, asserting runtime-namespace symbols are not globally bound and runtime anchors are present (tests/bundled_runtime_hidden.rs)
  • Behavioral Change: the bundled engine is now v26.11.0-rc.2, a pre-release revision

Macroscope summarized b17cf1b.

Move the engine pin from v26.9.2-rc.2 to v26.11.0-rc.1 in the three
places that carry it, as the release check's propose_bump step does:
CHDB_ENGINE_PIN in update_libchdb.sh and build.rs, and engine under
[package.metadata.chdb] in Cargo.toml.

This is a release candidate, taken to validate the engine before the
v26.11.1 release; the crate's release gate still applies, so it does
not publish against this pin.
Since chdb-core#261 the Linux libchdb.a is one relocatable object,
libchdb.o, made by ld -r with only the C API left global. It has no
libcxx__/libcxxabi__/libunwind__ members, so bundled_runtime_hidden
found nothing to check and failed by design against v26.11.0-rc.1.

For that layout the test now reads the archive's whole symbol table.
It requires one definition from each bundled runtime (libc++,
libc++abi, libunwind), so a missing runtime or stripped symbol table
cannot pass. It then asserts that no GLOBAL, WEAK or UNIQUE definition,
at any visibility, has a C++ runtime name. The macOS archive keeps the
member layout, so the member check is unchanged there and for older
Linux engines.

Measured on v26.11.0-rc.1: 68 global definitions on linux-x86_64 and
linux-aarch64, all C API; the three anchors are present as LOCAL.
Move the engine pin from v26.11.0-rc.1 to v26.11.0-rc.2 in the three
places that carry it, as the release check's propose_bump step does:
CHDB_ENGINE_PIN in update_libchdb.sh and build.rs, and engine under
[package.metadata.chdb] in Cargo.toml, plus the comment that names
the pin.

rc.2 is rc.1 plus chdb-core#312: chdb_shutdown() no longer refuses
after MergeTree use, the one-shot API works more than once per
process, a statement that follows a failed query no longer gets the
failed query's leftover output, and exiting with a connection open no
longer breaks the engine teardown after an engine restart or with the
static library. Its chdb.h differs from rc.1 only in CHDB_VERSION.

The static archives keep the rc.1 layout, measured the same way: one
prelinked libchdb.o whose 68 global definitions are all C API on
linux-x86_64 and linux-aarch64, and 0 visible definitions among 59
runtime members on macOS arm64. bundled_runtime_hidden's note on the
measured engines now says so.

This is still a release candidate: the crate's release gate applies,
so it does not publish against this pin.
On v26.11.0-rc.1, chdb_shutdown() refused once a MergeTree table had
been used: "chDB global pool shutdown refused: ...
MergeTreeBackgroundExecutorThreads", then "global thread pool did not
become idle", because the MergeTree background executors outlived the
engine. chdb-core#312 destroys them on shutdown, and rc.2 carries it.

The new runtime_faces case writes twenty parts to a MergeTree table
in a session, drops the session while the background merges have
work, calls runtime::shutdown() and lets the process exit. Like every
case there it runs in a process of its own, since a shutdown is
one-way. Against the rc.1 library it fails with EngineCallFailed from
chdb_shutdown (exit status 101); against rc.2 it passed 15 of 15 runs.
runtime::shutdown and docs/examples.md said that a process that simply
exits does not need it. The engine does not support that: exiting with
a connection still open leaves its teardown to run inside exit(), and
while MergeTree merges run in the background that teardown can crash
the process. Against the rc.2 library on linux-x86_64, 5 of 5 such
exits died with SIGSEGV or SIGABRT, while dropping the connection
first, with or without runtime::shutdown() afterwards, exited cleanly
10 of 10 times. The rc.2 release notes say the same: close every
connection, or call chdb_shutdown(), before the process exits.

The docs now say to drop every connection before the process exits and
to call shutdown after the last one, and name the two ways a Rust
program keeps a connection open at exit: std::process::exit runs no
destructors, and a connection held in a static is never dropped.

A code comment in shutdown also cited chdb.h by line numbers
(1078-1080) that no longer point at chdb_shutdown; it now names the
function's documentation instead.
@wudidapaopao wudidapaopao changed the title Pin chdb-core v26.11.0-rc.1 Pin chdb-core v26.11.0-rc.2 Nov 5, 2026
@wudidapaopao
wudidapaopao merged commit dc80d55 into chdb-io:main Nov 5, 2026
11 checks passed
wudidapaopao added a commit that referenced this pull request Nov 5, 2026
2.1.0 adds QueryResult::data_str (#59) and moves the engine to chdb-core
v26.11.0-rc.2 (#65), so it is a minor release.

The release-gate note in Cargo.toml said the crate does not publish
against a release candidate. This release does, so the note now names the
candidate it is published against. The Quick Start and docs/examples.md
still asked for 1.1.0 and 1.0.0, which resolve to 1.x and never reach 2.x.
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.

Static linking breaks backtrace

1 participant