Skip to content

Commit 3dc96db

Browse files
committed
Merge commit 'f6d01f0f6e31a8be6a52592760345557e980a270' of github.com:facebook/rocksdb into upgrade-7.7
2 parents 9a3435a + f6d01f0 commit 3dc96db

File tree

327 files changed

+10059
-3271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+10059
-3271
lines changed

.github/actions/windows-build-steps/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,40 @@ runs:
1515
SNAPPY_INCLUDE: ${{ github.workspace }}/thirdparty/snappy-1.1.8;${{ github.workspace }}/thirdparty/snappy-1.1.8/build
1616
SNAPPY_LIB_DEBUG: ${{ github.workspace }}/thirdparty/snappy-1.1.8/build/Debug/snappy.lib
1717
run: |-
18+
# NOTE: if ... Exit $LASTEXITCODE lines needed to exit and report failure
1819
echo ===================== Install Dependencies =====================
1920
choco install liberica8jdk -y
21+
if(!$?) { Exit $LASTEXITCODE }
2022
mkdir $Env:THIRDPARTY_HOME
2123
cd $Env:THIRDPARTY_HOME
2224
echo "Building Snappy dependency..."
2325
curl -Lo snappy-1.1.8.zip https://github.com/google/snappy/archive/refs/tags/1.1.8.zip
26+
if(!$?) { Exit $LASTEXITCODE }
2427
unzip -q snappy-1.1.8.zip
28+
if(!$?) { Exit $LASTEXITCODE }
2529
cd snappy-1.1.8
2630
mkdir build
2731
cd build
2832
& cmake -G "$Env:CMAKE_GENERATOR" ..
33+
if(!$?) { Exit $LASTEXITCODE }
2934
msbuild Snappy.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64
35+
if(!$?) { Exit $LASTEXITCODE }
3036
echo ======================== Build RocksDB =========================
3137
cd ${{ github.workspace }}
3238
$env:Path = $env:JAVA_HOME + ";" + $env:Path
3339
mkdir build
3440
cd build
3541
& cmake -G "$Env:CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=Debug -DOPTDBG=1 -DPORTABLE="$Env:CMAKE_PORTABLE" -DSNAPPY=1 -DJNI=1 ..
42+
if(!$?) { Exit $LASTEXITCODE }
3643
cd ..
3744
echo "Building with VS version: $Env:CMAKE_GENERATOR"
3845
msbuild build/rocksdb.sln -maxCpuCount -property:Configuration=Debug -property:Platform=x64
46+
if(!$?) { Exit $LASTEXITCODE }
3947
echo ========================= Test RocksDB =========================
4048
build_tools\run_ci_db_test.ps1 -SuiteRun arena_test,db_basic_test,db_test,db_test2,db_merge_operand_test,bloom_test,c_test,coding_test,crc32c_test,dynamic_bloom_test,env_basic_test,env_test,hash_test,random_test -Concurrency 16
49+
if(!$?) { Exit $LASTEXITCODE }
4150
echo ======================== Test RocksJava ========================
4251
cd build\java
4352
& ctest -C Debug -j 16
53+
if(!$?) { Exit $LASTEXITCODE }
4454
shell: pwsh

CMakeLists.txt

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,29 @@ project(rocksdb
4444
HOMEPAGE_URL https://rocksdb.org/
4545
LANGUAGES CXX C ASM)
4646

47+
if(APPLE)
48+
# On macOS Cmake, when cross-compiling, sometimes CMAKE_SYSTEM_PROCESSOR wrongfully stays
49+
# the same as CMAKE_HOST_SYSTEM_PROCESSOR regardless the target CPU.
50+
# The manual call to set(CMAKE_SYSTEM_PROCESSOR) has to be set after the project() call.
51+
# because project() might reset CMAKE_SYSTEM_PROCESSOR back to the value of CMAKE_HOST_SYSTEM_PROCESSOR.
52+
# Check if CMAKE_SYSTEM_PROCESSOR is not equal to CMAKE_OSX_ARCHITECTURES
53+
if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "")
54+
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_OSX_ARCHITECTURES)
55+
# Split CMAKE_OSX_ARCHITECTURES into a list
56+
string(REPLACE ";" " " ARCH_LIST ${CMAKE_OSX_ARCHITECTURES})
57+
separate_arguments(ARCH_LIST UNIX_COMMAND ${ARCH_LIST})
58+
# Count the number of architectures
59+
list(LENGTH ARCH_LIST ARCH_COUNT)
60+
# Ensure that exactly one architecture is specified
61+
if(NOT ARCH_COUNT EQUAL 1)
62+
message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES must have exactly one value. Current value: ${CMAKE_OSX_ARCHITECTURES}")
63+
endif()
64+
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_OSX_ARCHITECTURES})
65+
message(STATUS "CMAKE_SYSTEM_PROCESSOR is manually set to ${CMAKE_SYSTEM_PROCESSOR}")
66+
endif()
67+
endif()
68+
endif()
69+
4770
if(POLICY CMP0042)
4871
cmake_policy(SET CMP0042 NEW)
4972
endif()
@@ -196,7 +219,7 @@ endif()
196219

197220
if(MSVC)
198221
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /nologo /EHsc /GS /Gd /GR /GF /fp:precise /Zc:wchar_t /Zc:forScope /errorReport:queue")
199-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W4 /wd4127 /wd4800 /wd4996 /wd4351 /wd4100 /wd4204 /wd4324")
222+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FC /d2Zi+ /W4 /wd4127 /wd4996 /wd4100 /wd4324")
200223
else()
201224
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wextra -Wall -pthread")
202225
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-invalid-offsetof")
@@ -205,6 +228,7 @@ else()
205228
endif()
206229
if(MINGW)
207230
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format")
231+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj")
208232
add_definitions(-D_POSIX_C_SOURCE=1)
209233
endif()
210234
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -705,6 +729,7 @@ set(SOURCES
705729
db/memtable_list.cc
706730
db/merge_helper.cc
707731
db/merge_operator.cc
732+
db/multi_cf_iterator.cc
708733
db/output_validator.cc
709734
db/periodic_task_scheduler.cc
710735
db/range_del_aggregator.cc
@@ -1360,6 +1385,7 @@ if(WITH_TESTS)
13601385
db/memtable_list_test.cc
13611386
db/merge_helper_test.cc
13621387
db/merge_test.cc
1388+
db/multi_cf_iterator_test.cc
13631389
db/options_file_test.cc
13641390
db/perf_context_test.cc
13651391
db/periodic_task_scheduler_test.cc

HISTORY.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,51 @@
11
# Rocksdb Change Log
22
> NOTE: Entries for next release do not go here. Follow instructions in `unreleased_history/README.txt`
33
4+
## 9.1.0 (03/22/2024)
5+
### New Features
6+
* Added an option, `GetMergeOperandsOptions::continue_cb`, to give users the ability to end `GetMergeOperands()`'s lookup process before all merge operands were found.
7+
* *Add sanity checks for ingesting external files that currently checks if the user key comparator used to create the file is compatible with the column family's user key comparator.
8+
*Support ingesting external files for column family that has user-defined timestamps in memtable only enabled.
9+
* On file systems that support storage level data checksum and reconstruction, retry SST block reads for point lookups, scans, and flush and compaction if there's a checksum mismatch on the initial read.
10+
* Some enhancements and fixes to experimental Temperature handling features, including new `default_write_temperature` CF option and opening an `SstFileWriter` with a temperature.
11+
* `WriteBatchWithIndex` now supports wide-column point lookups via the `GetEntityFromBatch` API. See the API comments for more details.
12+
* *Implement experimental features: API `Iterator::GetProperty("rocksdb.iterator.write-time")` to allow users to get data's approximate write unix time and write data with a specific write time via `WriteBatch::TimedPut` API.
13+
14+
### Public API Changes
15+
* Best-effort recovery (`best_efforts_recovery == true`) may now be used together with atomic flush (`atomic_flush == true`). The all-or-nothing recovery guarantee for atomically flushed data will be upheld.
16+
* Remove deprecated option `bottommost_temperature`, already replaced by `last_level_temperature`
17+
* Added new PerfContext counters for block cache bytes read - block_cache_index_read_byte, block_cache_filter_read_byte, block_cache_compression_dict_read_byte, and block_cache_read_byte.
18+
* Deprecate experimental Remote Compaction APIs - StartV2() and WaitForCompleteV2() and introduce Schedule() and Wait(). The new APIs essentially does the same thing as the old APIs. They allow taking externally generated unique id to wait for remote compaction to complete.
19+
* *For API `WriteCommittedTransaction::GetForUpdate`, if the column family enables user-defined timestamp, it was mandated that argument `do_validate` cannot be false, and UDT based validation has to be done with a user set read timestamp. It's updated to make the UDT based validation optional if user sets `do_validate` to false and does not set a read timestamp. With this, `GetForUpdate` skips UDT based validation and it's users' responsibility to enforce the UDT invariant. SO DO NOT skip this UDT-based validation if users do not have ways to enforce the UDT invariant. Ways to enforce the invariant on the users side include manage a monotonically increasing timestamp, commit transactions in a single thread etc.
20+
* Defined a new PerfLevel `kEnableWait` to measure time spent by user threads blocked in RocksDB other than mutex, such as a write thread waiting to be added to a write group, a write thread delayed or stalled etc.
21+
* `RateLimiter`'s API no longer requires the burst size to be the refill size. Users of `NewGenericRateLimiter()` can now provide burst size in `single_burst_bytes`. Implementors of `RateLimiter::SetSingleBurstBytes()` need to adapt their implementations to match the changed API doc.
22+
* Add `write_memtable_time` to the newly introduced PerfLevel `kEnableWait`.
23+
24+
### Behavior Changes
25+
* `RateLimiter`s created by `NewGenericRateLimiter()` no longer modify the refill period when `SetSingleBurstBytes()` is called.
26+
* Merge writes will only keep merge operand count within `ColumnFamilyOptions::max_successive_merges` when the key's merge operands are all found in memory, unless `strict_max_successive_merges` is explicitly set.
27+
28+
### Bug Fixes
29+
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` when I/O is needed to fetch a merge chain's base value from a blob file.
30+
* Fixed `kBlockCacheTier` reads to return `Status::Incomplete` on table cache miss rather than incorrectly returning an empty value.
31+
* Fixed a data race in WalManager that may affect how frequent PurgeObsoleteWALFiles() runs.
32+
* Re-enable the recycle_log_file_num option in DBOptions for kPointInTimeRecovery WAL recovery mode, which was previously disabled due to a bug in the recovery logic. This option is incompatible with WriteOptions::disableWAL. A Status::InvalidArgument() will be returned if disableWAL is specified.
33+
34+
### Performance Improvements
35+
* Java API `multiGet()` variants now take advantage of the underlying batched `multiGet()` performance improvements.
36+
Before
37+
```
38+
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
39+
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 6315.541 ± 8.106 ops/s
40+
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 6975.468 ± 68.964 ops/s
41+
```
42+
After
43+
```
44+
Benchmark (columnFamilyTestType) (keyCount) (keySize) (multiGetSize) (valueSize) Mode Cnt Score Error Units
45+
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 64 thrpt 25 7046.739 ± 13.299 ops/s
46+
MultiGetBenchmarks.multiGetList10 no_column_family 10000 16 100 1024 thrpt 25 7654.521 ± 60.121 ops/s
47+
```
48+
449
## 9.0.0 (02/16/2024)
550
### New Features
651
* Provide support for FSBuffer for point lookups. Also added support for scans and compactions that don't go through prefetching.

INSTALL.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ most processors made since roughly 2013.
126126
* Update XCode: run `xcode-select --install` (or install it from XCode App's settting).
127127
* Install via [homebrew](http://brew.sh/).
128128
* If you're first time developer in MacOS, you still need to run: `xcode-select --install` in your command line.
129-
* run `brew tap homebrew/versions; brew install gcc7 --use-llvm` to install gcc 7 (or higher).
130129
* run `brew install rocksdb`
131130

132131
* **FreeBSD** (11.01):

0 commit comments

Comments
 (0)