Skip to content

Commit 4b33d2d

Browse files
authored
7.4 initial commit and 7.4.1 prerelease (#165)
* XDB-382 Merge upstream 7.4 initial commit * XDB-382 Merge upstream 7.4.1 * XDB-382 cherrypick XDB-360 fix tests from ow-fork-main to release-7.4 * XDB-364 added getting jemalloc version (#158) * XDB-368 create container with jemalloc (#159) * XDB-382 create container for 7.4.1 * XDB-382 added thread lib and pytest * XDB-382 fixed tests after upstream merge
1 parent 23cc51d commit 4b33d2d

555 files changed

Lines changed: 28001 additions & 16738 deletions

File tree

Some content is hidden

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

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ignore = E203, E266, E402, E501, W503, F403, F401, E711, C901, E721, W605
33
max-line-length = 88
44
max-complexity = 18
55
select = B,C,E,F,W,T4,B9
6-
exclude = bindings/python/fdb/six.py,contrib/Implib.so/implib-gen.py,documentation/sphinx/extensions/rubydomain.py
6+
exclude = contrib/Implib.so/implib-gen.py,documentation/sphinx/extensions/rubydomain.py

.github/workflows/build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
prepare: "debian-based"
5151
build_on: linux
5252
parallel: 5
53-
image: foundationdb-build:7.4.0-1.ow.build
54-
owner: owtech
53+
image: foundationdb-build:7.4.1-0.ow.build
54+
owner: ${GITHUB_REPOSITORY_OWNER@L}
5555
runs-on: ${{ matrix.run_on }}
5656
steps:
5757
- name: Checkout
@@ -180,12 +180,17 @@ jobs:
180180
JOSHUA_AGENT_TAG: "rhel8-20220816"
181181

182182
steps:
183+
- name: Checkout
184+
uses: actions/checkout@v4
185+
with:
186+
path: ${{github.workspace}}/src
187+
183188
- name: Install dependencies
184189
shell: bash
185190
run: |
186191
sudo apt-get update
187192
sudo apt-get install -y sudo wget crudini git python3 python3-pip
188-
sudo pip3 install wheel setuptools python-dateutil lxml boto3
193+
sudo pip3 install wheel setuptools python-dateutil lxml boto3 pytest
189194
190195
- name: Install FoundationDb
191196
shell: bash
@@ -227,12 +232,7 @@ jobs:
227232
podman pull ${{ env.JOSHUA_AGENT_URL }}/joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
228233
podman create --name joshua-agent -v /etc/foundationdb:/etc/foundationdb -it joshua-agent:${{ env.JOSHUA_AGENT_TAG }}
229234
podman start joshua-agent
230-
231-
- name: Checkout
232-
uses: actions/checkout@v4
233-
with:
234-
path: ${{github.workspace}}/src
235-
235+
236236
- name: run tests
237237
shell: bash
238238
working-directory: ${{github.workspace}}/fdb-joshua

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ repos:
55
- id: black
66
exclude: |
77
(?x)^(
8-
bindings/python/fdb/six.py|
98
contrib/Implib.so/implib-gen.py|
109
documentation/sphinx/extensions/rubydomain.py
1110
)$

CMakeLists.txt

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if(POLICY CMP0135)
2424
endif()
2525

2626
project(foundationdb
27-
VERSION 7.4.0
27+
VERSION 7.4.1
2828
DESCRIPTION "FoundationDB is a scalable, fault-tolerant, ordered key-value store with full ACID transactions."
2929
HOMEPAGE_URL "http://www.foundationdb.org/"
3030
LANGUAGES C CXX ASM Swift)
@@ -138,10 +138,26 @@ message(STATUS "FDB version is ${FDB_VERSION}")
138138
message(STATUS "FDB_PATCH is ${FDB_PATCH}")
139139

140140
set(FDB_CURRENT_VERSION ${PROJECT_VERSION})
141-
set(FDB_FUTURE_VERSION "7.5.0")
142-
set(FDB_PREV_RELEASE_VERSION "7.3.41")
143-
set(FDB_PREV2_RELEASE_VERSION "7.1.33")
144-
set(FDB_PREV3_RELEASE_VERSION "7.0.0")
141+
set(FDB_FUTURE_VERSION "8.0.0")
142+
set(FDB_PREV_RELEASE_VERSION "7.3.59")
143+
set(FDB_PREV2_RELEASE_VERSION "7.1.61")
144+
145+
set(MULTIREGION_TEST TRUE)
146+
option(NO_MULTIREGION_TEST "Disable multiregion simulation tests" OFF)
147+
148+
if (NO_MULTIREGION_TEST)
149+
set(MULTIREGION_TEST FALSE)
150+
add_definitions(-DNO_MULTIREGION_TEST)
151+
message(STATUS "NO_MULTIREGION_TEST is ON")
152+
endif()
153+
154+
set(RESTART_TEST TRUE)
155+
option(NO_RESTART_TEST "Disable restart simulation tests" OFF)
156+
if (NO_RESTART_TEST)
157+
set(RESTART_TEST FALSE)
158+
add_definitions(-DNO_RESTART_TEST)
159+
message(STATUS "NO_RESTART_TEST is ON")
160+
endif()
145161

146162
################################################################################
147163
# Flow
@@ -276,5 +292,3 @@ endif()
276292
print_components()
277293

278294
message(STATUS "CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL}")
279-
280-

README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@ Contributing to FoundationDB can be in contributions to the code base, sharing y
2020

2121
## Getting Started
2222

23+
### Latest Stable Releases
24+
25+
The latest stable releases are (were) versions that are recommended for production use, which have been extensively validated via simulation and real cluster tests and used in our production environment.
26+
27+
| Branch | Latest Production Release | Notes |
28+
|:--------:|:-------------:|------:|
29+
| 7.3 | [7.3.63](https://github.com/apple/foundationdb/releases/tag/7.3.63) | Supported |
30+
| 7.2 | | Experimental |
31+
| 7.1 | [7.1.57](https://github.com/apple/foundationdb/releases/tag/7.1.57) | Bug fixes |
32+
| 7.0 | | Experimental |
33+
| 6.3 | [6.3.25](https://github.com/apple/foundationdb/releases/tag/6.3.25) | Unsupported |
34+
35+
- `Supported` branches are those we actively maintain and will publish new patch releases.
36+
- `Bug fixes` are branches we still accept bug fixes into the branch, but may not publish newer patch releases. The community can build the latest release binaries if needed and is encouraged to upgrade to the `Supported` branches.
37+
- `Experimental` branches are those used for internal feature testing. They are not recommended for production use.
38+
- `Unsupported` branches are those which will no longer receive any updates.
39+
40+
If you are running on old production releases, we recommend always upgrading to the next major release's latest version, and then continue to the next major version, e.g., 6.2.X -> 6.3.25 -> 7.1.57 -> 7.3.63. These upgrade paths have been well tested in production (skipping a major release, not marked as `Experimental`, for an upgrade is only tested in simulation).
41+
2342
### Binary downloads
2443

2544
Developers interested in using FoundationDB can get started by downloading and installing a binary package. Please see the [downloads page](https://github.com/apple/foundationdb/releases) for a list of available packages.
@@ -34,7 +53,7 @@ The official docker image for building is [`foundationdb/build`](https://hub.doc
3453

3554
To build outside of the official docker image, you'll need at least these dependencies:
3655

37-
1. Install cmake Version 3.13 or higher [CMake](https://cmake.org/)
56+
1. Install cmake Version 3.24.2 or higher [CMake](https://cmake.org/)
3857
1. Install [Mono](https://www.mono-project.com/download/stable/)
3958
1. Install [Ninja](https://ninja-build.org/) (optional, but recommended)
4059

@@ -170,8 +189,8 @@ $SRCDIR/packaging/osx/buildpkg.sh . $SRCDIR
170189
Under Windows, only Visual Studio with ClangCl is supported
171190
172191
1. Install Visual Studio 2019 (IDE or Build Tools), and enable llvm support
173-
1. Install [CMake 3.15](https://cmake.org/) or higher
174-
1. Download [Boost 1.77.0](https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.7z)
192+
1. Install [CMake 3.24.2](https://cmake.org/) or higher
193+
1. Download [Boost 1.86.0](https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.bz2)
175194
1. Unpack boost to C:\boost, or use `-DBOOST_ROOT=<PATH_TO_BOOST>` with `cmake` if unpacked elsewhere
176195
1. Install [Python](https://www.python.org/downloads/) if is not already installed by Visual Studio
177196
1. (Optional) Install [OpenJDK 11](https://developers.redhat.com/products/openjdk/download) to build Java bindings

bindings/bindingtester/known_testers.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ def _absolute_path(path):
8686
testers = {
8787
"python": Tester(
8888
"python",
89-
"python " + _absolute_path("python/tests/tester.py"),
90-
2040,
91-
23,
92-
MAX_API_VERSION,
93-
types=ALL_TYPES,
94-
tenants_enabled=True,
95-
),
96-
"python3": Tester(
97-
"python3",
9889
"python3 " + _absolute_path("python/tests/tester.py"),
9990
2040,
10091
23,

bindings/bindingtester/run_tester_loop.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ function scripted() {
2020

2121
function run_scripted() {
2222
scripted python
23-
scripted python3
2423
scripted ruby
2524
scripted java
2625
scripted java_async
@@ -35,7 +34,6 @@ while `true`; do
3534
echo "Pass $i"
3635
i=$((i+1))
3736
run python
38-
run python3
3937
run ruby
4038
run java
4139
run java_async

bindings/bindingtester/tests/test_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ def random_tuple_list(self, max_size, max_list_size):
150150

151151
def random_range_params(self):
152152
if random.random() < 0.75:
153-
limit = random.randint(1, 1e3)
153+
limit = random.randint(1, int(1e3))
154154
elif random.random() < 0.75:
155155
limit = 0
156156
else:
157-
limit = random.randint(1e8, (1 << 31) - 1)
157+
limit = random.randint(int(1e8), (1 << 31) - 1)
158158

159159
return (limit, random.randint(0, 1), random.randint(-2, 4))
160160

bindings/bindingtester/util.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,25 @@
2727

2828

2929
def initialize_logger_level(logging_level):
30+
3031
logger = get_logger()
3132

32-
assert logging_level in ["DEBUG", "INFO", "WARNING", "ERROR"]
33+
# Map logging levels to their corresponding constants
34+
LOGGING_LEVELS = {
35+
"DEBUG": logging.DEBUG,
36+
"INFO": logging.INFO,
37+
"WARNING": logging.WARNING,
38+
"ERROR": logging.ERROR,
39+
}
40+
41+
if logging_level not in LOGGING_LEVELS:
42+
raise ValueError(f"Invalid logging level: {logging_level}")
43+
44+
logger.setLevel(LOGGING_LEVELS[logging_level])
45+
46+
47+
3348

34-
if logging_level == "DEBUG":
35-
logger.setLevel(logging.DEBUG)
36-
elif logging_level == "INFO":
37-
logger.setLevel(logging.INFO)
38-
elif logging_level == "WARNING":
39-
logger.setLevel(logging.WARNING)
40-
elif logging_level == "ERROR":
41-
logger.setLevel(logging.ERROR)
4249

4350

4451
def get_logger():

bindings/c/CMakeLists.txt

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,29 @@ if(NOT WIN32)
295295
)
296296

297297
file(GLOB API_TEST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/test/apitester/tests/*.toml")
298+
set(PATTERNS_TO_SKIP "XXXX")
299+
if (USE_ASAN)
300+
set(PATTERNS_TO_SKIP
301+
".*BlobGranule.*" # skip BlobGranule tests because we don't use
302+
".*Tenant.*" # skip Tenant tests because we don't use
303+
)
304+
endif()
298305
foreach(test_file ${API_TEST_FILES})
299306
get_filename_component(file_name "${test_file}" NAME_WE)
300307
set(test_name "fdb_c_api_test_${file_name}")
308+
309+
# skip tests that match the patterns in PATTERNS_TO_SKIP
310+
set(SKIP_FILE FALSE)
311+
foreach(PATTERN ${PATTERNS_TO_SKIP})
312+
if(file_name MATCHES "${PATTERN}")
313+
set(SKIP_FILE TRUE)
314+
break()
315+
endif()
316+
endforeach()
317+
if(SKIP_FILE)
318+
continue()
319+
endif()
320+
301321
add_python_venv_test(NAME "${test_name}"
302322
COMMAND python ${CMAKE_SOURCE_DIR}/bindings/c/test/apitester/run_c_api_tests.py
303323
--build-dir ${CMAKE_BINARY_DIR}
@@ -333,22 +353,6 @@ if(NOT WIN32)
333353
--client-config-tester-bin $<TARGET_FILE:fdb_c_client_config_tester>
334354
)
335355

336-
add_python_venv_test(NAME fdb_c_upgrade_from_prev3_gradual
337-
COMMAND python ${CMAKE_SOURCE_DIR}/tests/TestRunner/upgrade_test.py
338-
--build-dir ${CMAKE_BINARY_DIR}
339-
--test-file ${CMAKE_SOURCE_DIR}/bindings/c/test/apitester/tests/upgrade/MixedApiWorkloadMultiThr.toml
340-
--upgrade-path "${FDB_PREV3_RELEASE_VERSION}" "${FDB_PREV2_RELEASE_VERSION}" "${FDB_PREV_RELEASE_VERSION}" "${FDB_CURRENT_VERSION}" "${FDB_PREV_RELEASE_VERSION}"
341-
--process-number 3
342-
)
343-
344-
add_python_venv_test(NAME fdb_c_upgrade_from_prev3_direct
345-
COMMAND python ${CMAKE_SOURCE_DIR}/tests/TestRunner/upgrade_test.py
346-
--build-dir ${CMAKE_BINARY_DIR}
347-
--test-file ${CMAKE_SOURCE_DIR}/bindings/c/test/apitester/tests/upgrade/MixedApiWorkloadMultiThr.toml
348-
--upgrade-path "${FDB_PREV3_RELEASE_VERSION}" "${FDB_CURRENT_VERSION}" "${FDB_PREV_RELEASE_VERSION}"
349-
--process-number 3
350-
)
351-
352356
add_python_venv_test(NAME fdb_c_upgrade_from_prev2_gradual
353357
COMMAND python ${CMAKE_SOURCE_DIR}/tests/TestRunner/upgrade_test.py
354358
--build-dir ${CMAKE_BINARY_DIR}
@@ -398,22 +402,53 @@ if(NOT WIN32)
398402

399403
endif()
400404

401-
set(c_workloads_srcs
405+
set(cpp_workloads_srcs
402406
test/workloads/workloads.cpp
403407
test/workloads/workloads.h
404408
test/workloads/SimpleWorkload.cpp)
405409

410+
set(c_workloads_srcs
411+
test/workloads/CWorkload.c)
412+
406413
if(OPEN_FOR_IDE)
414+
add_library(cpp_workloads OBJECT ${cpp_workloads_srcs})
407415
add_library(c_workloads OBJECT ${c_workloads_srcs})
408416
else()
417+
add_library(cpp_workloads SHARED ${cpp_workloads_srcs})
409418
add_library(c_workloads SHARED ${c_workloads_srcs})
410419
endif()
420+
set_target_properties(cpp_workloads PROPERTIES
421+
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/share/foundationdb")
411422
set_target_properties(c_workloads PROPERTIES
412423
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/share/foundationdb")
413-
target_link_libraries(c_workloads PUBLIC fdb_c)
424+
target_link_libraries(cpp_workloads PUBLIC fdb_c)
425+
target_include_directories(c_workloads PUBLIC ${CMAKE_SOURCE_DIR}/bindings/c)
414426

415427
if(NOT WIN32 AND NOT APPLE AND NOT OPEN_FOR_IDE)
416-
target_link_options(c_workloads PRIVATE "LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/external_workload.map,-z,nodelete")
428+
# Add the -Wl,--undefined-version flag to the linker command to allow
429+
# undefined symbols in version scripts. Clang 19 doesn't allow this and would
430+
# complain with "symbol not defined" errors.
431+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.0.0")
432+
target_link_options(cpp_workloads PRIVATE
433+
"LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/external_workload.map"
434+
"LINKER:-z,nodelete"
435+
"LINKER:--undefined-version"
436+
)
437+
target_link_options(c_workloads PRIVATE
438+
"LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/external_workload.map"
439+
"LINKER:-z,nodelete"
440+
"LINKER:--undefined-version"
441+
)
442+
else()
443+
target_link_options(cpp_workloads PRIVATE
444+
"LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/external_workload.map"
445+
"LINKER:-z,nodelete"
446+
)
447+
target_link_options(c_workloads PRIVATE
448+
"LINKER:--version-script=${CMAKE_CURRENT_SOURCE_DIR}/external_workload.map"
449+
"LINKER:-z,nodelete"
450+
)
451+
endif()
417452
endif()
418453

419454
# Generate shim library in Linux builds

0 commit comments

Comments
 (0)