Skip to content

Bump rocksdb from v10.10.1 to v11.8.1 - #118929

Merged
thevar1able merged 3 commits into
ClickHouse:masterfrom
actueleai:bump-rocksdb-v11.8.1
Sep 21, 2026
Merged

thevar1able merged 3 commits into
ClickHouse:masterfrom
actueleai:bump-rocksdb-v11.8.1

Conversation

@actueleai

@actueleai actueleai commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Bumps rocksdb from 10.10.1 to 11.8.1, a major upstream release that removes the deprecated raw DB* open overloads and adds several new blob and index subsystems.

ClickHouse-side changes

  • contrib/rocksdb-cmake/CMakeLists.txt — added the 13 new upstream library sources (blob partition manager, blob gen2 format and write-batch transformer, read-path blob resolver, multi-scan index iterator, trie index, copy engine, sorted run builder, io dispatcher, coro stats, db/version_util.cc).
  • src/Storages/RocksDB/StorageEmbeddedRocksDB.cpp — switched to the std::unique_ptr<rocksdb::DB>* overloads of DB::Open / DB::OpenForReadOnly, since the raw DB* overloads were removed in 11.0.

Fork

Pinned to ClickHouse/rocksdb branch ClickHouse/v11.8.1, which is upstream v11.8.1 plus the one carried ClickHouse patch — pmull_runtime_flag made std::atomic<bool> in util/crc32c.cc to fix a TSan data race when several RocksDB instances open concurrently — rebased in ClickHouse/rocksdb#35.

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Update rocksdb to v11.8.1.


Workflow [PR]
Sync PR [sync-upstream/pr/118929]

Version info

  • Merged into: 26.10.1.347-master (included in 26.10 and later)

The submodule now points to `ClickHouse/v11.8.1` in the ClickHouse fork
(ClickHouse/rocksdb#35), which is upstream tag
`v11.8.1` plus the existing ClickHouse patch that makes
`pmull_runtime_flag` in `crc32c` a `std::atomic<bool>` (TSan fix from
ClickHouse/rocksdb#29), exactly as the previous
`ClickHouse/v10.10.fb` pin did.

Adaptations:
- `contrib/rocksdb-cmake/CMakeLists.txt`: add the 13 library sources that
  upstream added to `LIB_SOURCES` between v10.10.1 and v11.8.1
  (blob partition manager, blob gen2 format, blob write batch transformer,
  `version_util`, read-path blob resolver, multi-scan index iterator,
  coroutine stats and I/O dispatcher, copy engine, sorted run builder,
  trie index).
- `StorageEmbeddedRocksDB`: RocksDB 11.0 removed the raw `DB *` overloads of
  `DB::Open` and `DB::OpenForReadOnly`; use the `std::unique_ptr<DB>`
  overloads instead.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@thevar1able
thevar1able self-requested a review September 9, 2026 00:38
@thevar1able thevar1able self-assigned this Sep 9, 2026
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Sep 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [3862b27]

Summary: ❌

job_name test_name status info comment
Build profile diff ERROR

AI Review

Summary

This PR bumps the vendored rocksdb from 10.10.1 to 11.8.1, updates the custom rocksdb-cmake source list for the new upstream files, switches StorageEmbeddedRocksDB to the surviving std::unique_ptr<rocksdb::DB>* open overloads, and repoints the submodule URL at the ClickHouse fork. I found one blocker: the new upstream release drops support for opening SSTs with BlockBasedTableOptions.format_version < 2, which makes this a backward-incompatible change for some existing EmbeddedRocksDB deployments that attach external rocksdb_dirs or use non-default RocksDB options.

PR Metadata
  • Changelog category is not correct for the actual change. This is not just a build-only update: it changes runtime behavior for existing EmbeddedRocksDB data and needs to be marked as Backward Incompatible Change.
  • Changelog entry is required for that category, and the current Update rocksdb to v11.8.1. entry is too vague because it omits the migration impact.
  • Exact replacement:
    ### Changelog category (leave one):
    - Backward Incompatible Change
    ### Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
    Older EmbeddedRocksDB directories whose SST files use BlockBasedTableOptions.format_version < 2 can no longer be opened after upgrading to the bundled rocksdb v11.8.1. Run a full compaction with rocksdb < 11.0.0 before upgrading such data.
Findings

❌ Blockers

  • [contrib/rocksdb:1] EmbeddedRocksDB supports opening existing external rocksdb_dirs and forwards arbitrary rocksdb.block_based_table_options from config, but RocksDB 11.0.0 drops support for reading or writing SST files with BlockBasedTableOptions.format_version < 2. After this submodule bump, a legitimate pre-existing directory using that older SST format will start failing at DB::Open*() with a generic ROCKSDB_ERROR, with no migration hook or compatibility warning in the PR.
    Suggested fix: treat this as a backward-incompatible change. At minimum, update the PR metadata / changelog with the required migration step and make the failure mode more explicit for users; if this surface is meant to stay supported, add a compatibility strategy instead of shipping the raw upstream break.
Missing context / blind spots
  • ⚠️ I did not run local EmbeddedRocksDB tests in this checkout because the vendored submodule is not initialized here and the full build/test jobs for this PR are still pending. A focused proof that closes the remaining gap would be either an automated upgrade-path test or manual evidence that ClickHouse’s supported EmbeddedRocksDB inputs cannot contain SSTs with format_version < 2.
Final Verdict

❌ Changes requested. The RocksDB 11.x pin introduces a backward-incompatible open-time failure mode for some existing EmbeddedRocksDB data, and the PR currently treats the bump as a build-only change instead of carrying the required migration story.

LLVM Coverage Report

Measured on commit 3862b27.

Metric Baseline Current Δ
Lines 88.40% 88.40% +0.00%
Functions 91.80% 91.70% -0.10%
Branches 80.70% 80.60% -0.10%

Changed lines: Changed C/C++ lines covered: 6/6 (100.00%) · Uncovered code

Full report · Diff report

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. labels Sep 9, 2026
The pin is the head of `ClickHouse/v11.8.1` in `ClickHouse/rocksdb` (v11.8.1 plus the crc32c TSan fix), so the URL should name the fork instead of relying on GitHub serving fork-network objects through `facebook/rocksdb`.
@clickhouse-gh clickhouse-gh Bot added manual approve Manual approve required to run CI comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. labels Sep 9, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing commit 3862b27289ff991ebeec09548c448284d12a007d with master failed: RuntimeError: CI logs cluster query failed: SELECT file, symbol, sumIf(size, side = 'pr….

See the job log for details.

@thevar1able
thevar1able marked this pull request as ready for review September 10, 2026 20:18
@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 37 queries analysed

This PR only bumps the rocksdb submodule (v10.10.1 to v11.8.1), adds the new upstream sources to the rocksdb CMake list, and switches StorageEmbeddedRocksDB to the unique_ptr DB::Open overloads. None of that touches the MergeTree query-execution path that ClickBench runs against the hits table. The two flagged regressions, Q4 (AVG(UserID), +16.7%) and Q5 (COUNT(DISTINCT UserID), +10.0%), never execute any rocksdb code, so both were downgraded to not_sure as run-to-run variance rather than a real PR effect. No cross-query pattern ties these two together beyond the shared conclusion that the changed code is off their execution path.

clickbench

⚠️ 2 inconclusive

Flagged queries (2 of 43)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 4 not_sure 192 224 +16.7% <0.0001 This PR only bumps the rocksdb submodule and touches StorageEmbeddedRocksDB open code; ClickBench Q4 (AVG(UserID) over MergeTree hits) never touches rocksdb, so the +16.7% is run-to-run variance, not a PR effect.
⚠️ 5 not_sure 254 280 +10.0% <0.0001 Q5 (COUNT(DISTINCT UserID) over MergeTree hits) exercises no rocksdb code, which is all this rocksdb-bump PR changes; the +10.0% is unrelated to the diff and reads as variance.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: e1f1f36d-5a7d-421b-919e-63a56b6e7db9
  • MIRAI run: 8fb99035-eb8d-4fcc-9493-e3ed0b938d50
  • PR check IDs:
    • clickbench_795789_1789771357
    • clickbench_795796_1789771357
    • clickbench_795802_1789771357
    • tpch_adapted_1_official_795811_1789771357
    • tpch_adapted_1_official_795824_1789771357
    • tpch_adapted_1_official_795859_1789771357

Comment thread contrib/rocksdb
@@ -1 +1 @@
Subproject commit d250fae809fe6af931d12a857d07e6f2b96e1c11
Subproject commit 7d4d9327af02f4d3ac0a028817d11e4a8a0cce90

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

EmbeddedRocksDB explicitly supports reopening an existing external rocksdb_dir, but this bump silently narrows that contract. RocksDB 11.0.0 dropped support for SSTs whose BlockBasedTableOptions.format_version is < 2; after this pin, both DB::Open paths here will start failing on such directories unless the user first runs a full compaction on a pre-11 build.

That is a real backward-incompatible open-time exception for legitimate existing setups, especially because we also forward arbitrary rocksdb.block_based_table_options from config. The PR needs an explicit compatibility story before merge: at minimum a changelog / release note that calls out the migration requirement, and ideally a clearer ClickHouse-side diagnostic for this case instead of surfacing a generic ROCKSDB_ERROR.

@thevar1able

Copy link
Copy Markdown
Member

🕵️

  • The claim itself is accurate: RocksDB 11.0.0 drops reading SSTs with format_version < 2 (HISTORY.md, 11.0.0 section).
  • But format_version 2 has been the default since RocksDB 4.6 in 2016. ClickHouse's first EmbeddedRocksDB pin in 2020 was RocksDB 6.x, whose default was already 4. No directory ever created by ClickHouse with default settings is affected.

@thevar1able
thevar1able added this pull request to the merge queue Sep 21, 2026
Merged via the queue into ClickHouse:master with commit f3346ee Sep 21, 2026
175 of 177 checks passed
@thevar1able
thevar1able deleted the bump-rocksdb-v11.8.1 branch September 21, 2026 12:49
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 21, 2026
huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. manual approve Manual approve required to run CI pr-build Pull request with build/testing/packaging improvement pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants