Commit Graph

121 Commits

Author SHA1 Message Date
Trevor Clinkenbeard b32cebc19c
Merge pull request #13693 from tclinkenbeard-oai/dev/tclinkenbeard/add-split-point-limit-support
Add split point limit support
2026-07-16 14:12:29 -07:00
Trevor Clinkenbeard 17c87353cd Simplify split point limit support 2026-07-13 17:18:29 -07:00
Trevor Clinkenbeard cd2c16ff38 Bound split-point work across shards and bindings 2026-07-13 15:29:03 -07:00
Trevor Clinkenbeard 8f7a072a3d Add split point limit support 2026-07-13 11:01:33 -07:00
Trevor Clinkenbeard 8debe8fcce Remove unused includes and dependencies 2026-07-12 09:54:20 -07:00
Pierce Lopez 4d0d6fe06a bindings/python: correct pre-release version string
The renamed wheel's filename version won't match its own METADATA.
The artifact `setuptools`/`build` produces is baked with version
`${FDB_VERSION}` but then the file is renamed to include `${not_fdb_release_string}`
(if not a release nor a release-candidate). This is not good,
for example the `twine` pypi upload tool would reject this.

For release-candidates, FDB_VERSION will have form `X.X.X-rcN`, but python
build/package tools will normalize that to `X.X.XrcN` with no dash,
so the copy step will fail.

So this change makes sure the python package knows its full version,
and cmake also knows the exact same python-package version.

Also, use regular `copy` instead of `copy_if_different` to ensure
output file age is newer than its prerequisites, to avoid possibly
getting a situation where python packaging step runs again on every
incremental rebuild uneccessarily.

Caught by claude-code (in review of a backport).
2026-06-23 12:52:53 -04:00
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
gxglass df96a141f5
Add back C library implementations for fdb_database_open_tenant and 3 other methods (#12593)
This allows 7.x python libraries to load these methods. It does this on startup to set up python/C API stuff, regardless
of whether the API user actually invokes this functionality (which was experimental and is now removed).

More details: rdar://166307379

Testing:
ctest -R c_api
ctest -R python

20251211-224723-gglass-17ed16f020aa18de compressed=True data_size=35311862 duration=5560013 ended=100000 fail_fast=1000 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=1:01:01 sanity=False started=100000 stopped=20251211-234824 submitted=20251211-224723 timeout=5400 username=gglass
2025-12-12 09:34:27 -08:00
gxglass bab7637d87
Delete multitenant and metacluster features (#12583)
These features have been previously marked for deletion per PR #12400.

This change necessarily affects a lot of files. In general I found it preferable to cut along the FDB <-> tenant boundary, rather than try to cut tenant into multiple pieces, stitch the Frankenstein tenant implementation back together with FDB, and generally remove the limbs one by one. So it is a single big deletion.

Note that some tenant-related metadata has been written in a non-flag-controlled manner by prior releases and probably must be ignored indefinitely. Fortunately this is isolated to include/fdbclient/ClientLogEvents.h. (Details: deleting an Optional from a serialized struct results in deserialization of garbage in upgrade tests. The serialized nullopt to indicate "no Tenant" is formally part of FDB persistent metadata even in FDB clusters that never would have enabled the tenant feature.)

During the course of testing these changes, many interesting bugs were encountered. I won't discuss details of them here. Causes range from flat out damage (by me) to production code in the course of removing tenant related bits (mainly in NativeAPI.actor.cpp and CommitProxy.actor.cpp), damage to various workload files (particularly FuzzApiCorrectness.actor.cpp, which is very sensitive to changes), and many toml files needing updated test flags/options.

More testing details: https://quip-apple.com/Zr6VAycxoli9

20251209-012852-gglass-8ff850b772d868f2 compressed=True data_size=35311687 duration=21671404 ended=500000 fail_fast=1000 max_runs=500000 pass=500000 priority=100 remaining=0 runtime=2:31:30 sanity=False started=500000 stopped=20251209-040022 submitted=20251209-012852 timeout=5400 username=gglass

* remove some unneeded tests, and remove mentions of deleted tests from tests/CmakeLists.txt

* Initiate removal of metacluster. NOTE: this seems to also want removal of tenant. Consider removing them together.

* work on removing metacluster

* delete files with `Tenant` in the name, having reviewed them to ensure that they basically contain what the name implies

* fdb_c.h: remove prototypes for C API methods which have been deleted (blob granule) or which are so long deprecated that they are outside any reasonable/documented support window

* Surgical removal of tenant references from files in bindings/ top level directory.  Compilation not yet attempted.

* Surgical removal of tenant related stuff from fdbcli/ top level directory.  Compilation not yet attempted.

* Misc tenant code removal, and other stuff which I think may not be needed.  Compilation still not attempted.

* Remove more tenant or tenant-adjacent or blob-granule-adjacent stuff.  Or at least stuff that looks adjacent to that stuff.  Not compiled or tested.

* Start removing Tenant stuff from fdbclient/.  Far from complete.  Compilation not attempted.

* Remove tenant references from many source files.  There are still about 7 principal fdbclient/ and fdbserver/ files with a lot of tenant logic left to delete. Also, all of fdbserver/workloads needs to be looked at.  Still have not attempted compilation.

* Remove tenant entanglement from watch functionality

* Remove tenant stuff from fdbserver/tester.actor.cpp

* Delete metacluster workloads

* Remove tenant related stuff from workloads.  Also taken the liberty of removing some functionality that appears unused or untestable by Apple.

* Checkpoint tenant removal from FuzzApiCorrectness.actor.cpp

* NativeAPI.actor.cpp: `Tenant` has left the building.

* SimulatedCluster.actor.cpp: `Tenant` has left the building

* DDShardTracker.actor.cpp: Tenant evicted

* storageserver.actor.cpp: `tenant` has left the building.

* fdbserver/workloads/FuzzApiCorrectness.actor.cpp: remove tenant references, but some lingering cleanup needed in `loadAndRun`

* FileBackupAgent.actor.cpp: tenant has left the building

* CommitProxyServer.actor.cpp: remove tenant

* Remove more tenant references from misc files such as bindings tests, documentation, and some fdbserver headers I left earlier

* Fix missing-file errors in CMakeLists.txt files.  This is the first attempt to compile this stuff.

* checkpoint misc changes to fix compile errors

* checkpoint more compile fixes

* StorageServerInterface.h: put back more verify() calls

* More misc compile fixes

* whole bunch of misc fixups including some code put-backs to address compile errors

* More compile fixes

* More compile fixes.  Still does not compile.

* incremental compile fixing

* ...

* ...

* Checkpoint a bunch of compile fixes.  Not quite there but getting closer

* More compile fixes.  There seem to be about 10 files left, mainly CommitProxyServer.actor.cpp and storageserver.actor.cpp

* IT COMPILES NOW.  THIS IS STILL ALL UNTESTED.  Unsurprisingly, CommitProxyServer.actor.cpp and storageserver.actor.cpp took the most tweaking.

The updates in CMakeLists.txt and workloads/UnitTests.actor.cpp are basically trivial and mainly reflect
the ordering of dependencies -- that stuff didn't get attempted until all of fdbserver compiled.

* Put back one block relating to encryption at rest mode.  Simplify some TODO(gglass) instances.

* Put back some encryption related knobs

* remove `enable_tenants` from local_cluster.py to maybe fix some ctests

* Remove tenant related options from toml files.

* feature-status.md: add a line for encryption at rest, which seems to have been added for multi-tenant; status is now in doubt

* Fix a pretty bad bug introduced in tenant deletion; ensure we dont attempt to construct a std::string of negative length

* workloads/FuzzApiCorrectness.actor.cpp: avoid division by zero

* flow/Platform.actor.cpp: add a try/catch wrapper around side threads; emit a better addr2line type command

* NativeAPI.actor.cpp: fix a bug introduced in tenant removal relating to reporting conflicting keys under conflictingKeysRange

* ReportConflictingKeys.actor.cpp: separate an ANDed assert into two asserts

* SpecialKeySPaceCorrectness.actor.cpp: put back some logic removed with tenant removal.  This test was failing due to a bug with conflict key range reporting.  Fixed separately in NativeAPI.actor.cpp.

* remove QuotaCommand.actor.cpp

* Force disable tenant and encryption on disk in upgrade tests

* Add back file I guess I deleted?  who knows

* put back another file

* design/feature-status.md: update the new row for encryption at rest to firm up the claim that it is experimental, unowned, and scheduled for deletion

* Remove EncryptKeyProxyTest since we do not use it

* new file tests/slow/BulkDumpingS3WithChaos.toml: remove tenantModes setting

* Undo damage to pushToBackupMutations() from removing tenant feature.  This caused inverted_range errors and failed commits in backup related simulations.

* tests/restarting/from_7.4.0/Snap*-1: ensure that tenantModes = disabled

* Try again on workloads/FuzzApiCorrectness.actor.cpp

* simplify tenant-free (mostly) FuzzApiCorrectness workload code

* try harder to remove lingering tenant-related brokenness from FuzzApiCorrectness.actor.cpp

* Explicitly specify tenantModes = ['disabled'] in all the -1 restart files

* Remove tenantModes from 7.1-based upgrade tests as its an unknown option.  Hopefully the code doesnt actually turn on tenant stuff

* do not specify tenantModes in downgrade tests

* Downgrade test to_7.4.5: dont say tenantModes

* more tenantModes updates

* Remove a legacy allowDefaultTenant that no longer is meaningful in downgrade to 8.0

* Put back empty Optional<TenantName> turdlets into serialized log events to avoid breaking ClientTransactionProfilingCorrectness upgrade tests (even with tenantMode = disabled)

* disable encryption on a few more upgrade related test cases.  That feature is slated for removal anyway

* Remove unneeded workload files that have been subject to #if 0 for a while. Remove commented out block in ClusterRecovery

* disable encryption in more upgrade tests

* Remove choice four-letter words from commentary

* Format 42 files

* Try to fix a doc bug failing the CI build

* More doc compilation error fixes

* Delete more tenant junk from documentation

* fix spelling mistake in comment

* Remove deleted cross-references from documentation.  This necessitated editing release 3.0.0 release notes, which is insane.

* Remove more tenant stuff from bindings tests

* Remove more tenant bits from design/ files

* Remove more tenant related stuff

* Delete more tenant references.  Put back ten-ant spellings as tenant now that grep output is substantially reduced.

* Put back some tenant stuff into apitester; its deletion seems to have introduced bugs.  Also whine about comments some more, because, really, the comments deserve it.

* Updates to workload files and one other thing based on review comments

* de-actorify decodeKVPairs

* format one source file

* Restore transaction tagging doc

* Restore throttle doc details in administration.rst

* Restore fdbserver/workloads/GetEstimatedRangeSize.actor.cpp and associated toml file, minus tenant stuff

* bindings/c/test/{shim related}: update comments and disable functionality that no longer works post-tenant

* put the cli-throttle tag back in

* bindingtester: fix python syntax errors

* remove useless comment

* Remove comment about useless comments, and remove the useless comments
2025-12-09 12:39:41 -08:00
gxglass b1d6dcf0e7
Delete blob granule feature (#12435)
This is the first experimental feature to be deleted in the list published at PR #12400.

There is more code here than I anticipated. It is about 40,000 lines total, of which about three quarters are in dedicated files which I am deleting, and about one quarter is in shared files. That means about 10k lines in shared files, which is the stuff we tend to notice day to day (that plus the test failures on heretofore not-yet-disabled test cases, which I am now deleting).

I ran 3 million simulations, mostly against 692df86 or very similar code (differing by one TraceEvent). This was prior to syncing with upstream/main, which had no conflicts and from which I don't expect problems. The number of failures in these runs was about 8. We looked at them and believe there is a high likelihood that these are existing issues not related to the changes in this PR. More details on these failures can be found in docs linked from here: https://quip-apple.com/MN7gAyXLjgyn

* change Long Term status for unowned features for "scheduled for deletion" where applicable

* Relax wording about scheduled for deletion features

* Delete blob granule feature.  WIP.  Does not compile.

* more incremental hacking to remove / comment out blob granule related code

* more hacking to remove blob granule related code, e.g. blob manager and blob migrator roles

* delete more blob granule stuff

* more hacking

* more hacking

* more hacking

* More changes to remove blob granule related code.  IT COMPILES NOW

* dont try to run AuthzSecurity tests as we have deleted that workload as part of this effort

* delete more stuff that matches, abbreviates, or smells like blob granule related

* EncryptKeyProxy: dont do blobMetadata stuff, because that is not used and support is being removed

* delete more references to blob granule stuff

* SimulationConfig::setEncryptionAtRestMode: always use DISABLED; also disable EncryptKeyProxyTest.toml

* format code

* manual update to bindings/java/src/tests.cmake to remove a deleted file

* fix compile errors.  I guess by default I dont build Java bindings

* remove unneeded blob granule functions rather than #if..#endif them out

* remove more code in #if..#endif

* remove more code in #if 0..#endif

* revert changes to fdb_c.h in preparation for marking removed API calls as removed

* rework C API declarations to in preparation for marking blob granule APIs as removed

* deprecate removed glob granule related API functions as of version 740 (and add a comment to request a justification of this convention)

* make progress on broken ctests.  E.g. 1) python does not need to do blob granule stuff.  2) authz tests seemingly not needed

* remove blob granule stuff from Java and Python APIs and fix test runner stuff so that ctests pass

* reformat comments to fix compile error.  FIXME: why is this error not happening on the default compile commands we use

* hacks all the way down to try to fix the Mac build

* add pointed comment about the perceived pointlessness of the API deprecation scheme embodied in this source file

* really serious about the C++ style comments, arent we

* remove commented-out code from prior iterative efforts

* put back undeleted code in original order

* delete commented-out code

* update feature-status.md to say blob granule is mostly deleted

* upgrade `mostly deleted` to `has been deleted`
2025-10-13 16:18:56 -07:00
Sepeth 39172d7dc4
Remove Python 2.7 support and six.py (#11418) 2024-10-02 21:12:51 -07:00
Syed Paymaan Raza 392bad2bd3
More copyright end year updates (#11556) 2024-08-05 14:00:32 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Xiaoge Su 010d070de0 Modernize the Python3 package build configuration 2024-04-22 18:44:32 -07:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
A.J. Beamon fef2967d62 Fix several issues found by flake8. Ignore E402, which detects when we have import statements not at the top of the file, since we have many files that use this pattern and are not easy to fix. 2023-05-02 10:06:40 -07:00
A.J. Beamon 182dc93ebd Apply black format to most Python files, excluding a few cases where we have Python 2 files and a few files written externally. Add external files as exclusions to the precommit checks. 2023-04-28 11:46:41 -07:00
Jon Fu 30132ebac6
Expose list_blobbified_ranges for tenants in python API (#9940)
* add tenant getId api to fdbcli

* expose list_blobbified_ranges for tenants in python API
2023-04-13 13:05:37 -04:00
Vaidas Gasiunas f7e2f0b6ce Define latest python binding API version in one place 2023-02-27 13:12:10 +01:00
Vaidas Gasiunas afc25035f8
Client status report API in Java and python bindings (#9366)
* get_client_status: add to Java bindings

* Add get_client_status in python binding

* Make python unit tests available as ctest

* Fix file name in the copyright header

* Fix library path name for mac

* get_client_status: Minor changes in Java & Python bindings addressing review comments

* Rename fdb_python_unit_tests to unit_tests
2023-02-15 18:00:53 +01:00
Jon Fu 4c2a09aab5 add arg and return type to the c_api for impl.py 2023-01-26 14:51:08 -08:00
Jon Fu cb6ad92ed6 initial commit to add python and Java binding support 2023-01-10 14:19:03 -08:00
A.J. Beamon ed9acd550e Properly generate operations with the _TENANT suffix.
Add atomic op functions to the tenant object in Python.
Fix a Python tester bug for tenant operations.
Fix a build error with the binding tester package.
2022-11-30 15:30:10 -08:00
Lukas Molleman 3bf017d59a C:/Program Files/Git/bindings/python/fdb/ Applied flake8 2022-11-09 20:43:43 +01:00
Junhyun Shim 2e51a110f2 Fix Python binding's fdb_c lookup
All python documentations indicate you shouldn't put prefixes like 'lib' or
suffixes like '.so', '.dll', or '.dylib' in argument to ctypes.util.find_library(),
unlike ctypes.CDLL() which demands an exact file name.
I suppose this case hasn't been tested.
2022-09-20 22:47:04 +02:00
A.J. Beamon 0c91336461 Remove unnecessary special key-space relaxed option in binding tenant management 2022-09-12 14:30:28 -07:00
A.J. Beamon 726d5215a0
Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (#8108)
* Remove API 720 guards for tenants (experimental feature) and the cluster ID special keys (no need to guard)

* Enable the relaxed special key access in transactions that need to use special key-space APIs introduced in 7.2
2022-09-08 17:22:36 +02:00
A.J. Beamon 2f67328a0c Update the tenant special keys submodule to support multiple sub-ranges. This will enable future work that allows configuring tenants at the same time as creating them. 2022-06-30 15:03:37 -07:00
Jon Fu ff216c2f57 add tenant list metadata to binding tester 2022-05-02 13:42:11 -04:00
Jon Fu 2afaf55a48 fixed some binding tests and split stack operation between key and value of tenant list 2022-04-29 13:16:04 -04:00
Jon Fu 9e79ff49a6 address code review comments and add more places for test code 2022-04-21 16:58:32 -04:00
Jon Fu c683795f6b add python bindings and revise test code 2022-04-13 14:20:24 -04:00
Aaron Molitor 5ba8b82ba6 update version to 7.2.0 -- address pr comments 2022-04-11 23:23:27 -05:00
Aaron Molitor cbaef8f03b update version to 7.2.0 2022-04-11 23:23:27 -05:00
A.J. Beamon b4cfcc10d3 Move Python tenant management to its own module 2022-03-25 11:36:35 -07:00
A.J. Beamon 77ce0f4fc7 Add a unit test in Python to exercise some of the tenant code. Add some comments to the allocate and delete tenant implementations. 2022-03-23 15:50:06 -07:00
A.J. Beamon 8b92d3fccd Use special keys to create/delete tenants 2022-03-23 14:46:56 -07:00
Jon Fu 8e848f16df Support tuples in python tenants 2022-03-23 14:46:55 -07:00
A.J. Beamon ce03f5783d Add tenant support to Python 2022-03-23 14:46:55 -07:00
Ray Jenkins 9e1fd3cee5 Add comment about python thread API not necessarily setting underlying OS thread name. 2022-01-26 12:36:37 -06:00
Ray Jenkins 95d4497e2b Add python binding network thread name. 2022-01-25 13:20:31 -06:00
Jingyu Zhou 3ce31cb347 Upgrade api version from 700 to 710 2021-05-05 21:15:00 -07:00
A.J. Beamon 4a1a55f270 Remove fdb_get_server_protocol from the Python bindings. This C function this was using recently moved and changed signature, so it no longer works in Python. 2021-04-16 13:48:44 -07:00
Richard Chen b4ea82435c fix typo in python 2020-12-07 00:18:22 +00:00
Richard Chen a671aa773e add symbol to python global symbols 2020-10-24 00:19:05 +00:00
Richard Chen 90caa24af1 add function to get correct checksum class. Remove IChecksum::checkSum function 2020-10-23 02:24:29 +00:00
Richard Chen a4ccf8c5b6 add checksum class to change checksum in the future. expose get server protocol api 2020-10-19 16:57:11 +00:00
Xin Dong e108f041a0 Version the behavior change of existing API so that new behavior only happen after 7.0 2020-09-16 09:43:57 -07:00
Xin Dong acdf04ed18 Make sure Python and Ruby does null check 2020-09-15 14:09:53 -07:00
Xin Dong 13c9dc6e37 Forgot to update local variables 2020-09-11 16:57:00 -07:00