Commit Graph

559 Commits

Author SHA1 Message Date
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -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
Syed Paymaan Raza 5d49fe1bc9
Reduce frequency of two categories of Sev30s (#12311) 2025-08-20 10:31:04 -07:00
Akanksha Mahajan e20e95465d Fix ServerKnob fetching on fdbcli json 2025-05-14 10:15:21 -07:00
Yao Xiao 6811f42735
Add rocksdb version to status json. (#11868)
* Add rocksdb version to status json.

* update schema
2025-01-09 12:56:09 -08:00
Syed Paymaan Raza 1f8b72c066
Gray failure machine readable status (#11758) 2024-11-12 15:50:08 -08:00
Syed Paymaan Raza c146ee0869
[fdbserver] Use STL contains method and std::find for containment checks (#11702) 2024-10-15 11:40:02 -07:00
Jingyu Zhou 95adc14806 Fix a cluster controller crash in status server
The logSystemConfig could be changed after the yield(), thus the iterator can
points to invalid memory.

To reproduce with gcc build at commit 3e90644779:
   -f tests/slow/DDBalanceAndRemoveStatus.toml -s 3134372275 -b off
2024-08-13 20:55:26 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
neethuhaneesha adf0e8fa18
Rocksdb metrics in status json (#11321) 2024-04-18 22:00:58 -07:00
Jingyu Zhou f3efc90e7f Fix a DR corruption bug
The clear in status call can cause corruptions.

To reproduce with clang build:
seed: -f ./tests/slow/ApiCorrectnessSwitchover.toml -s 223736449 -b on
commit: f8eca6a80
Apply the ./tests/slow/ApiCorrectnessSwitchover.toml file in this commit.
2024-03-08 18:01:51 -08:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Sreenath Bodagala b0be152aad - Capture data center log and storage server version differences in
ClusterController and include them in status json.
2023-11-08 17:28:36 +00:00
Johannes M. Scheuermann 9591a8e382 Correct the check for a machine being excluded 2023-10-19 11:42:46 +02:00
Sreenath Bodagala fe2a8b10b2 - Address PR review comments (includes a special key related test) 2023-10-06 16:19:56 +00:00
Sreenath Bodagala 9cde595207 - Re-use the current mechanism for gathering status. 2023-10-02 19:38:26 +00:00
Sreenath Bodagala 3c01b1befe - Add a special key in order to fetch a specific group of status json fields. 2023-09-25 16:23:19 +00:00
Jingyu Zhou 12fe500633 ClusterController watches changes to storage metadata
To retrieve storage metadata for every status json request is very expensive
for clusters with a large number of storage servers. So I change the logic so
that ClusterController actively monitors changes to storage metadata, and only
retrieves them when there is a change.
2023-09-15 14:19:04 -07:00
Lukas Joswiak b3e58761d3 Avoid creating a DatabaseContext on every status json call
DatabaseContext currently leaks memory by creating `Counter`s with
unique IDs on construction. Each status json call creates a new
`DatabaseContext` object, causing a memory leak over time.
2023-09-01 19:55:17 -07:00
Ata E Husain Bohra 22ddb8a92d
Prevent Status actor from bubbling up timeout error (#10791)
Description

Patch addresses occurrences where Status.actor ends up bubbling timeout error
up to the ClusterController causing recovery to be triggered when
ClusterGetStatus timeout for some reason.

Testing
2023-08-18 15:21:52 -07:00
Evan Tschannen 3209dc7b30
Fixed multiple bugs related to locality based exclusions (#10623)
* fix: Non-storage processes were not being checked for locality exclusions
fix: Data distribution when not detect a newly added process was locality excluded
fix: RemoveServerSafely did not wait for processes to be excluded before killing them when excluding localities

* fix: do not allow locality based excludes if they cannot exclude the required addresses
2023-08-11 15:17:02 -07:00
Yi Wu 333a08269a address comments 2023-07-17 20:06:02 -07:00
Yi Wu e095309d51 add kms stable state to status json 2023-07-17 20:06:02 -07:00
Hui Liu aed406e947
Show manifest dump info in status json even when no flushing (#10584) 2023-06-30 13:04:43 -07:00
Xiaoge Su de7db7ba14 fixup! reformat source 2023-06-20 18:07:05 -07:00
Xiaoge Su 63dde188dd Report missing attribute in StorageServer status 2023-06-20 18:07:05 -07:00
Hui Liu af20493ad0
Move lastFlushTs to BlobGranuleBackupConfig (#10505) 2023-06-16 16:12:10 -07:00
Hui Liu 126a827359
Add blob manifest url and mlogs url in status json. (#10454) 2023-06-09 09:20:39 -07:00
Nim Wijetunga 95bf14323f
EKP and KMS Health Check (#10341)
EKP and KMS Health Check
2023-06-01 16:24:04 -07:00
Hui Liu 7ca13d8f9c
support blob restore in fdbrestore (#10248) 2023-05-19 14:45:14 -07:00
Josh Slocum 2916a11a86
New ConsistencyScan (#10265)
* Remove duplicate getRange() for DB handles and update existing GetRange to accept DB handles.

* Initial progress checkpoint on new ConsistencyScan role.

* Updated TODOs, finished most if not all state updates.

* placeholder

* Add more TODOs, documentation and comment improvements.

* Checkpoint round state to avoid advancing progress if commit fails.

* Bug fix, check is supposed to be for overlap, not lack of overlap.

* Added more TODO's and added faked read results / exceptions and faked DB size retrieval to prove the consistencyScanCore logic works.

* Update JSON schemas and command help.

* Add comment about lifetime stats reset.

* More TODO comments and some renames for clarity, some bug fixes.

* properly stopping consistency scan in simulation so that it doesn't run forever and cause quiet database to fail

* removing trailing comma from consistency_scan json schema

* Making CC inconsistency not an error if it's intentional tss corruption

* consistency scan actually reads storage locations

* added check that consistency scan actually completes a round in simulation, fixed bug and added debugging around consistency scan getting stuck

* made consistency scan properly fetch database size

* refactoring data check to be used in both consistency scan and consistency check

* checking that consistency scan always completes at least one round and doesn't get stuck

* cleanup

* fixing ide build

* consistencyscan fdbcli command wasn't actually changing db state

* consistencyscan fdbcli command always said enabled even when it wasn't

---------

Co-authored-by: Steve Atherton <steve.atherton@snowflake.com>
2023-05-18 15:02:41 -05:00
A.J. Beamon d8141c049d Add code probes for tenant code 2023-05-10 20:44:39 -07:00
Zhe Wu a2fb300ee2 Yeidl in processStatusFetcher when getting log and log router processes in earlier generations 2023-05-09 14:47:48 -07:00
Zhe Wu 108e9dccf4 Status json add roles for old generation tlogs 2023-05-09 10:26:56 -07:00
Hui Liu 53e68065e7
Support blob manifest backup for fdbbackup cmdline (#10091) 2023-05-08 16:07:22 -07:00
Xiaoxi Wang 3605d8c74c populate storage metadata for tss 2023-05-01 18:08:08 -07:00
A.J. Beamon 85f5e206a7
Merge pull request #10047 from sfc-gh-ajbeamon/add-metacluster-version
Add a metacluster version to the MetaclusterRegistrationEntry and validate it when loading the entry
2023-05-01 12:32:37 -07:00
A.J. Beamon b258159d3a Change enum capitalization. Improve error reporting if we cannot read metacluster registration when fetching metacluster metrics. Improve timeliness of metacluster metrics updates. 2023-05-01 11:21:42 -07:00
Hui Liu bd8c15634e
Create blob connection per tenant for blob restore (#10070) 2023-05-01 10:26:55 -07:00
A.J. Beamon f1cbc86b94 Add a metacluster version to the MetaclusterRegistrationEntry and validate it when loading the entry from the cluster. 2023-04-27 10:04:57 -07:00
Steve Atherton 7f6d5f296a Merge commit 'e318fc260070ba6ba604930b8f259c9b655938ea' into keybackedrangemap
# Conflicts:
#	flow/include/flow/error_definitions.h
2023-04-25 14:21:23 -07:00
Hui Liu 08fffd3bc2
Empty check before calling openContainer on it (#10044) 2023-04-24 17:38:56 -07:00
Steve Atherton 53ee26d758 Changed KeyBackedTypes to an actor file. Added TypedKeySelectors for Map and Set classes and getRange() keySelector methods. Added debug macro for KeyBackedTypes. Rewrote KeyBackedRangeMap using keyselectors on KeyBackedMap. 2023-04-18 22:21:19 -07:00
Nim Wijetunga c780d706d1
Remove EKP Interface from ServerDBInfo (#9909)
Remove ekp interface from ServerDBInfo
2023-04-06 11:35:47 -07:00
A.J. Beamon 9c786e6d1e
Merge pull request #9854 from sfc-gh-ajbeamon/metacluster-separate-project
Metacluster refactoring
2023-04-04 09:43:41 -07:00
Hui Liu f2a406f609
Add blob manifest and mutation log status to "status json" (#9856) 2023-04-03 18:30:13 -07:00
A.J. Beamon 807646675c Refactor the metacluster project into smaller files, and reorganize the namespaces. Move some metacluster and tenant testing helpers into the metacluster project. 2023-03-30 16:20:09 -07:00
A.J. Beamon e61748c7d5 Move metacluster into its own directory and static library 2023-03-30 16:07:49 -07:00
Xiaoxi Wang e48fd10d8d add perpetual wiggle to .team_tracker field 2023-03-20 09:46:36 -07:00