Skip to content

Commit 7c3c98a

Browse files
committed
feat: Update rocksdb to 10.7.5
1 parent f6e1a84 commit 7c3c98a

File tree

7 files changed

+44
-21
lines changed

7 files changed

+44
-21
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "ckb-rocksdb"
33
description = "Rust wrapper for Facebook's RocksDB embeddable database"
4-
version = "0.22.2"
4+
version = "0.23.0"
55
edition = "2024"
66
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
77
license = "Apache-2.0"
@@ -35,7 +35,7 @@ rtti = ["librocksdb-sys/rtti"]
3535
[dependencies]
3636
home = "0.5"
3737
libc = "0.2"
38-
librocksdb-sys = { package = "ckb-librocksdb-sys", path = "librocksdb-sys", version = "=9.10.2" }
38+
librocksdb-sys = { package = "ckb-librocksdb-sys", path = "librocksdb-sys", version = "=10.7.5" }
3939
tempfile = "3"
4040
serde = { version = "1", features = ["derive"], optional = true }
4141

librocksdb-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ckb-librocksdb-sys"
3-
version = "9.10.2"
3+
version = "10.7.5"
44
edition = "2024"
55
authors = ["Karl Hobley <karlhobley10@gmail.com>", "Arkadiy Paronyan <arkadiy@ethcore.io>", "Nervos Core Dev <dev@nervos.org>"]
66
license = "MIT/Apache-2.0/BSD-3-Clause"
@@ -51,6 +51,6 @@ uuid = { version = "1.0", features = ["v4"] }
5151
[build-dependencies]
5252
cc = { version = "1.0", features = ["parallel"] }
5353
bindgen = { version = "0.72.1" }
54-
glob = "0.3.2"
54+
glob = "0.3.3"
5555
pkg-config = "0.3"
5656
rust-ini = "0.21"

librocksdb-sys/build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,11 @@ fn build_rocksdb() {
267267
// Add Windows-specific sources
268268
lib_sources.extend([
269269
"port/win/env_default.cc",
270-
"port/win/port_win.cc",
271-
"port/win/xpress_win.cc",
272-
"port/win/io_win.cc",
273-
"port/win/win_thread.cc",
274270
"port/win/env_win.cc",
271+
"port/win/io_win.cc",
272+
"port/win/port_win.cc",
275273
"port/win/win_logger.cc",
274+
"port/win/win_thread.cc",
276275
]);
277276

278277
if cfg!(feature = "jemalloc") {

librocksdb-sys/build_detect_platform

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,43 @@
4545
# exit 1
4646
# fi
4747

48-
# we depend on C++17, but should be compatible with newer standards
48+
# we depend on C++20, but should be compatible with newer standards
4949
if [ "$ROCKSDB_CXX_STANDARD" ]; then
5050
PLATFORM_CXXFLAGS="-std=$ROCKSDB_CXX_STANDARD"
5151
else
52-
PLATFORM_CXXFLAGS="-std=c++17"
52+
PLATFORM_CXXFLAGS="-std=c++20"
5353
fi
5454

5555
# we currently depend on POSIX platform
5656
COMMON_FLAGS="-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX"
5757

58-
# Default to fbcode gcc on internal fb machines
59-
if [ -z "$ROCKSDB_NO_FBCODE" -a -d /mnt/gvfs/third-party ]; then
58+
# Default to fbcode gcc on Meta internal machines
59+
IS_META_HOST="$(hostname | grep -E '(facebook|meta).com|fbinfra.net')"
60+
if [ -z "$ROCKSDB_NO_FBCODE" -a "$IS_META_HOST" ]; then
61+
if [ -d /mnt/gvfs/third-party ]; then
62+
echo "NOTE: Using fbcode build" >&2
6063
FBCODE_BUILD="true"
6164
# If we're compiling with TSAN or shared lib, we need pic build
6265
PIC_BUILD=$COMPILE_WITH_TSAN
6366
if [ "$LIB_MODE" == "shared" ]; then
6467
PIC_BUILD=1
6568
fi
6669
source "$PWD/build_tools/fbcode_config_platform010.sh"
70+
else
71+
echo "************************************************************************" >&2
72+
echo "WARNING: -d /mnt/gvfs/third-party failed; no fbcode build" >&2
73+
echo "************************************************************************" >&2
74+
fi
6775
fi
6876

6977
# Delete existing output, if it exists
7078
# rm -f "$OUTPUT"
7179
# touch "$OUTPUT"
7280

7381
if test -z "$CC"; then
74-
if [ -x "$(command -v cc)" ]; then
82+
if [ "$USE_CLANG" -a -x "$(command -v clang)" ]; then
83+
CC=clang
84+
elif [ -x "$(command -v cc)" ]; then
7585
CC=cc
7686
elif [ -x "$(command -v clang)" ]; then
7787
CC=clang
@@ -81,7 +91,9 @@ if test -z "$CC"; then
8191
fi
8292

8393
if test -z "$CXX"; then
84-
if [ -x "$(command -v g++)" ]; then
94+
if [ "$USE_CLANG" -a -x "$(command -v clang++)" ]; then
95+
CXX=clang++
96+
elif [ -x "$(command -v g++)" ]; then
8597
CXX=g++
8698
elif [ -x "$(command -v clang++)" ]; then
8799
CXX=clang++
@@ -91,7 +103,9 @@ if test -z "$CXX"; then
91103
fi
92104

93105
if test -z "$AR"; then
94-
if [ -x "$(command -v gcc-ar)" ]; then
106+
if [ "$USE_CLANG" -a -x "$(command -v llvm-ar)" ]; then
107+
AR=llvm-ar
108+
elif [ -x "$(command -v gcc-ar)" ]; then
95109
AR=gcc-ar
96110
elif [ -x "$(command -v llvm-ar)" ]; then
97111
AR=llvm-ar
@@ -360,9 +374,13 @@ EOF
360374
fi
361375

362376
if ! test $ROCKSDB_DISABLE_ZSTD; then
363-
# Test whether zstd library is installed
377+
# Test whether zstd library is installed with minimum version
378+
# (Keep in sync with compression.h)
364379
$CXX $PLATFORM_CXXFLAGS $COMMON_FLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
365380
#include <zstd.h>
381+
#if ZSTD_VERSION_NUMBER < 10400
382+
#error "ZSTD support requires version >= 1.4.0 (libzstd-devel)"
383+
#endif // ZSTD_VERSION_NUMBER
366384
int main() {}
367385
EOF
368386
if [ "$?" = 0 ]; then

librocksdb-sys/build_version.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
// The build script may replace these values with real values based
1010
// on whether or not GIT is available and the platform settings
11-
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:ae8fb3e5000e46d8d4c9dbf3a36019c0aaceebff";
12-
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:v9.10.0";
11+
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:812b12bc7827eb0589927befc1514cff86eb46c6";
12+
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:v10.7.5";
1313
#define HAS_GIT_CHANGES 0
1414
#if HAS_GIT_CHANGES == 0
1515
// If HAS_GIT_CHANGES is 0, the GIT date is used.
1616
// Use the time the branch/tag was last modified
17-
static const std::string rocksdb_build_date = "rocksdb_build_date:2024-12-16 19:17:27";
17+
static const std::string rocksdb_build_date = "rocksdb_build_date:2025-10-20 11:17:17";
1818
#else
1919
// If HAS_GIT_CHANGES is > 0, the branch/tag has modifications.
2020
// Use the time the build was created.
21-
static const std::string rocksdb_build_date = "rocksdb_build_date:2024-12-16 19:17:27";
21+
static const std::string rocksdb_build_date = "rocksdb_build_date:2025-12-10 03:21:06";
2222
#endif
2323

2424
extern "C" {

librocksdb-sys/rocksdb

Submodule rocksdb updated 640 files

librocksdb-sys/rocksdb_lib_sources.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ db/memtable.cc
7878
db/memtable_list.cc
7979
db/merge_helper.cc
8080
db/merge_operator.cc
81+
db/multi_scan.cc
8182
db/output_validator.cc
8283
db/periodic_task_scheduler.cc
8384
db/range_del_aggregator.cc
@@ -203,6 +204,7 @@ table/block_fetcher.cc
203204
table/cuckoo/cuckoo_table_builder.cc
204205
table/cuckoo/cuckoo_table_factory.cc
205206
table/cuckoo/cuckoo_table_reader.cc
207+
table/external_table.cc
206208
table/format.cc
207209
table/get_context.cc
208210
table/iterator.cc
@@ -234,6 +236,7 @@ trace_replay/trace_replay.cc
234236
trace_replay/block_cache_tracer.cc
235237
trace_replay/io_tracer.cc
236238
util/async_file_reader.cc
239+
util/auto_tune_compressor.cc
237240
util/build_version.cc
238241
util/cleanable.cc
239242
util/coding.cc
@@ -253,6 +256,7 @@ util/rate_limiter.cc
253256
util/ribbon_config.cc
254257
util/slice.cc
255258
util/file_checksum_helper.cc
259+
util/simple_mixed_compressor.cc
256260
util/status.cc
257261
util/stderr_logger.cc
258262
util/string_util.cc
@@ -302,6 +306,8 @@ utilities/persistent_cache/block_cache_tier_file.cc
302306
utilities/persistent_cache/block_cache_tier_metadata.cc
303307
utilities/persistent_cache/persistent_cache_tier.cc
304308
utilities/persistent_cache/volatile_tier_impl.cc
309+
utilities/secondary_index/secondary_index_iterator.cc
310+
utilities/secondary_index/simple_secondary_index.cc
305311
utilities/simulator_cache/cache_simulator.cc
306312
utilities/simulator_cache/sim_cache.cc
307313
utilities/table_properties_collectors/compact_for_tiering_collector.cc

0 commit comments

Comments
 (0)