Commit Graph

354 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
Jingyu Zhou 7f06b8e334 Fix IDE build compiling errors 2026-01-19 14:29:12 -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 16a9edab44
delete cacheTag (#12492)
* delete cacheTag per code review request. Follow-up on PR#12486, deletion of storage cache feature.

* clean up comment about tagLocalitySpecial
2025-10-21 22:42:18 -07: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
Sreenath Bodagala de5b0a19a9
Acknowledge state store commits after receiving a reply from the sequencer (#12423)
* - If version vector is enabled, do not acknowledge transaction state
store commits until the proxy receives a reply from the sequencer
(at which point the current version and all versions prior to the
current version can be treated as committed)

* - Code review related changes
2025-10-09 21:38:28 -07:00
Dan Lambright 5717d0135f
Optimize resolver collection performance in CommitProxyServer (#12391) 2025-09-30 12:34:44 -04:00
Jingyu Zhou 38c3045ded
Optimize keyInfo lookup in commit proxy (#12104)
* Optimize keyInfo lookup in commit proxy

Replacing expensive two RangeMap lookups with one.

20250424-232218-jzhou-babebfe4fe6201e0

* Remove dead code
2025-04-26 10:45:46 -07:00
Dan Lambright 432374a4df
Disable version vector unicast with idempotent transactions (#12039)
* Disable version vector unicast with idempotent transactions

* Respond to review requests

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-21 15:30:06 -07:00
Syed Paymaan Raza bc8eca15e1
Initialize lastShardMove for recovery txn and in CommitBatchContext (#12027) 2025-03-13 15:25:46 -07:00
Dan Lambright 8c6f8c1403
Track shard moves for version vector (#11977)
* Track shard moves for version vector

* Don't broadcast to all TL when a different CP had a metadata mutation, unless on shard moves

* update lastShardMove on resolver

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-11 13:19:57 -04:00
Jingyu Zhou 082cded30a Set max_read_transaction_life_versions for KillRegionCycle.toml
Simulation found an assertion failure in SS:
	ASSERT(rollbackVersion >= data->storageVersion());

The reason is that storage version is updated to a version larger than the
forced recovery version, due to only 1'000'000 for max_read_transaction_life_versions.
Also added debugging for cumulative checksum mutations.

See rdar://144550725

20250309-185039-jzhou-5145c65b0e8071b7
2025-03-09 11:37:46 -07:00
Dan Lambright 8bba38b180
Version vector: compute locations only once during commits. (#11924)
* During commits with version vector enabled, compute location list only once, as recalcuating could
generate a different random number, hence a different set of locations.

* Respond to review comments.

* Select replicas from locations returned from resolver.

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-04 17:09:06 -05:00
Jingyu Zhou 8cd90ee7d0 Holds onto temporary variables' memories
Otherwise, StringRef points to free'ed memory locations.
2025-02-10 14:45:24 -08:00
hao fu 93133c83fb address comments 2025-01-23 12:32:27 -08:00
hao fu 933b035729 Refactor backup mutation serialization 2025-01-23 08:52:18 -08:00
flowguru fe47ce24d3
New restore consolidated commit (#11901)
* New restore consolidated commit

This change adds RestoreDispatchPartitionedTaskFunc to restore
from partitioned-format backup.

* ArenaBlock::totalSize parameter pass by ref

* Fix format issues identified by CI
2025-01-22 14:54:55 -08:00
Sreenath Bodagala 265b4bc7b5 - When version vector is enabled, make proxies advance min committed
version only after receiving a commit version reply from the sequencer.
Advancing the min committed version prior to that point may result in
invalid DBRecoveryDurability errors (if a recovery happens after the
advancement) in simulation tests.
2024-12-06 00:20:33 +00:00
Zhe Wang 0cf708b174
Fix accumulative checksum (#11751)
* fix accumulative checksum

* ss does not persist acs value per epoch

* nits
2024-11-04 13:15:26 -08:00
Zhe Wang 22249b46d3
make range lock compatibility clear (#11748) 2024-11-01 09:48:25 -07:00
Dan Lambright 317956ee14
disable version vector with range lock tests (#11746)
* disable version vector with range lock tests

* turn off rangeLock if versionvector is on (#11747)

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
Co-authored-by: Zhe Wang <zhe.wang@wustl.edu>
2024-10-31 21:07:01 -04:00
Zhe Wang 43446204ed
Database Per-Range Lock (#11693)
* range lock framework

* improve the framework

* persist to txnStateStore

* fix bugs

* code clean

* code clean

* bug fix

* address comments

* add complex test workload and fix bugs found by the workload

* add workload correctness check and fix bugs

* code clean up

* add random range lock injection

* fix bugs in RandomRangeLock.actor.cpp

* enable random range lock injection in general workloads

* add rangelockcycle test

* disable random range lock in backup workloads

* nits

* add range lock ownership concept

* enable lock ownership to rangeLock

* api deal with tenant

* fix CI

* add test for multiple rangeLock owners

* nits

* address comments and renaming

* address comments
2024-10-23 16:25:56 -07:00
Dan Lambright a87e940e05
fix bug TxnStateStoreCycleTest for version vector (#11723)
* fix bug TxnStateStoreCycleTest for version vector

* Respond to review comment

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-10-23 15:53:15 -04: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 fc30fc269e Remove dead code after removing tagLocalityUpgraded usage
20240918-170752-jzhou-33111b2c3e6776aa
2024-09-18 11:23:09 -07:00
Jingyu Zhou 7b76561bb9 Remove tagLocalityUpgraded usage at various places
Since we have removed old tlog implementation, so the code path using this tag
can be deleted to simplify the code.
2024-09-18 11:23:09 -07:00
Dan Lambright fff5d73125
Fix bug in PR 11628, which did not account for pseudo tags (#11643)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-10 15:31:32 -04:00
Dan Lambright 5eafd46351
Disable version vector on batches with backed up mutations (#11634)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-09 21:18:59 -04:00
Dan Lambright 85ef093d71
Choose log router tag prior to resolution in commit path for version vector. (#11628)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-06 11:20:30 -04:00
Syed Paymaan Raza 48064f6cf1
Make some codeprobes rare (#11607)
* Make BlobGranule code probes rare

* Make encryption related code probes rare

* fixup! Fix formatting
2024-08-26 22:33:38 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Xiaoge Su b324bfb9b9
When a commit is cancelled, record all unresponsive/failed TLogs (#11459)
* When a commit is cancelled, record all unresponsive/failed TLogs

* fixup!

* fixup!

* fixup!
2024-07-23 17:26:11 -07:00
Jingyu Zhou a733e48048
Merge pull request #11517 from jzhou77/release-notes
Fix Wunused-but-set-variable warnings
2024-07-18 13:51:21 -07:00
Sreenath Bodagala aacf2e29db
Compute known committed version correctly when version vector unicast is enabled (#11511)
* - Compute known committed version correctly when version vector unicast
is enabled.

* - Set ProxyCommitData::minKnownCommittedVersion only if the commit
version is above ProxyCommitData::committedVersion.
2024-07-18 14:41:40 -04:00
Jingyu Zhou 3a3ee247ab Fix Wunused-but-set-variable warnings 2024-07-17 13:09:32 -07:00
Xiaoge Su cf70d45e6d Add PeerAddress to all PeerAddr/Peer TraceEvent
This is to address #4846
2024-07-09 16:49:22 -07:00
Zhe Wang 314f4c41c7
Fix ACS mutation bug and improve accumulative checksum (#11319)
* enable acs by default

* code clean

* improve ACS code

* nits

* nits

* fix data corruption issue triggered by acs mutation
2024-04-20 01:31:55 -07:00
Jingyu Zhou e0674ced7c Increase CommitProxyTerminated severity for failed_to_progress errors.
For better visibility.
2024-04-17 14:49:48 -07:00
Zhe Wang 33eecd0775
Real-time corruption detection with accumulative checksum (#11255)
* acs framework

* code refactor and fix bugs

* add ss crash loop protector

* use sharedptr instead of raw pointer

* fixed critical bugs and add provate mutation acs to the framework

* enable ACS for all mutations except for clear serverTag mutation and fix bugs

* fix restarting tests

* refactor code and fix bugs

* fix AccumulativeChecksumState toString

* fix bugs

* allow all mutations in acs and fixed bugs

* fix bugs and code cleanup

* code clean up for adding recovery support

* simplify code and support recovery

* clear acs state at ss

* fix bug

* terminate validator if ss will be removed in the current batch

* simplify code

* add trace

* address comments

* optimize code

* deep copy when adding mutation to acs validator

* warp encode and decode persist acs key

* make acstable private

* remove unless func

* remove unless func

* remove epoch in ACS validator

* add acs mutation counter in SS metrics

* code cleanup and make knob check better

* make mutation buffer global

* simplify code

* add comments

* make knob randomly set

* address comments

* ss reboot after acs mismatch found
2024-04-04 15:03:44 -07:00
Dan Lambright f3b2bca2c2
Fix detection of private mutations in version vector (#11268)
* Fix detection of private mutations in version vector

* add assertion that all tlogs receive changes to txn state in version vector

* Re-suppress version_vector upgrade tests

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-04-01 15:20:32 -04:00
Dan Lambright 50f8eabfa3
Remove assertion equality in tcpvmap size on resolver return. (#11262) 2024-03-21 13:42:04 -04:00
Zhe Wang b10c7107bb
Enable Accumulative Checksum in MutationRef (#11225)
* code clean up and add accumulative checksum bits to mutation ref

* address comments and fix issues

* address comments

* propagate acs index from commit proxy to storage server

* address comments

* address comments

* address comments

* address comments
2024-03-11 09:51:31 -07:00
He Liu 9d8d52cbb7
Added checksum in MutationRef (#11181)
* Append checksum to param2.

* Pass sim tests w/o validating checksums.

* Code cleanup.

* Renew checksum.

* Remove checksum for all private mutations.

* Added checksum validation at SS.

* Fixed VERSION_TIMESTAMP.

* Disable Mutation Checksum by default.

* Cleanup.

* cleanup.
2024-02-09 13:36:41 -08:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Dan Lambright 015167c17e
Throttle commits against hot shards (#10970)
* throttle hot shards

* expire throttled shards over time

* add backoff

* Parallelize messaging from RK to CP

* Obtain shards from a single SS

* handle expired transactions

* bump transaction_throttled_hot_shard

* Change SevError to SevWarn for CannotMonitorHotShardForSS

* Add log per request
2023-10-31 12:01:34 -04:00
sfc-gh-tclinkenbeard dccc0e6773 Merge remote-tracking branch 'origin/main' into main-fix-clear-cost-estimation 2023-09-04 13:30:46 -07:00
Yi Wu 3287098b4a EaR: Handle KMS timeout in storage server and commit proxy 2023-08-28 16:17:43 -07:00
sfc-gh-tclinkenbeard d6a7e1eccd Normalize clear costs for quota throttler 2023-08-22 15:29:28 -07:00
Nim Wijetunga 7f2260bbd2
Add Encryption Related Latency Metrics (#10596)
* add ss and cp latency metrics

* make changes
2023-07-14 11:30:16 -07:00
Ata E Husain Bohra 7779c908b3
EaR: Remove usage of ENABLE_CONFIGURABLE_ENCRYPTION knob (#10570)
Description

Given Configurable encryption has been checked in and being tested via
simulation for more than a month and also to avoid penalty of accessing
KNOBS in inline commit path, patch retires the KNOB and make
ConfigurationEncryption default EaR mode for FDB.

BlobCipher still supports the old format header and encryption semantics,
will remove the dead code as a followup PR.

Testing

devRunCorrectness - 100K
2023-06-30 17:48:09 -07:00