Commit Graph

171 Commits

Author SHA1 Message Date
walter e2baa88a84
Add rocksdb options index_block_restart_interval and index_type (#12639) 2026-01-21 12:42:38 -08:00
walter 5614ae64aa
Add rocksdb option max_bytes_for_level_multiplier (#12634) 2026-01-13 09:46:24 -08:00
Syed Paymaan Raza ba1d659587
Delete sharded rocks extraneous code (logWriteSize function and its callsites) (#12633) 2026-01-12 22:39:45 -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
Michael Stack 231f76201d
Joshua: Capture test config for crashed tests (#12584)
* Joshua: Capture test config for crashed tests

Implements multiple fallback layers to ensure crashed tests always output
XML with reproduction info instead of empty strings.

Changes:
- fdbserver: Log TestConfiguring event before simulation starts
- TestHarness2/run.py: Parse traces + handle UnicodeDecodeError
- TestHarness2/app.py: Finally block ensures XML output
- Joshua scripts: Generate fallback XML if Python crashes

Fixes crashes from binary data in output and ensures test config is
always available for local reproduction of Joshua failures.

* Suppress emission of binary characters (This looks to be an old issue surfaced by changes in previous commit)

* Address review comments and allow that older binaries without this
fix could emit binary characters -- warn rather than fail in this
case.
2025-12-05 10:48:38 -08:00
Yao Xiao 52db7f9168
Support multiple range in sharded rocksdb. (#12181) 2025-07-07 11:55:55 -07:00
Syed Paymaan Raza 8c6bc892b2
ShardedRocks determinism phase 2 (PSM, Checkpoint) (#12203) 2025-06-23 20:37:10 -07:00
Syed Paymaan Raza bafb5ca6a3
Apply latest clang-format (#12080) 2025-04-10 20:29:51 -07:00
neethuhaneesha 1d9f16bf07
Added compaction knobs. (#12018) 2025-03-12 12:38:23 -07:00
Vishesh Yadav b66cf62cca rocksdb: fix crash due to uninitialized/stale ColumnFamilyHandle
`CreateColumnFamilyWithImport()` expects that the value inside
handle is `nullptr`. This patch fixed a codepath where we pass
a stale handle left by destroyed column family.
2025-02-28 10:46:59 -08:00
Yao Xiao 67b9b5c9f3
Remove per thread histogram in storage engine and fix bugs in range scan. (#11967) 2025-02-25 10:52:46 -08:00
Yao Xiao 76d514bf56
Update shared rocksdb knobs. #11936 (#11938) 2025-02-11 15:41:02 -08:00
Yao Xiao 382cd9c744
Close and delete DB when checkpoint reader gets an error. #11925 2025-02-05 16:30:11 -08:00
Yao Xiao fff5439ef2
Close DB properly in unit tests. #11915 2025-01-30 08:49:55 -08:00
Yao Xiao 786e2a6093 Add custom compaction policy based on number of range deletions in file
* compaction policy

* fix build error
2025-01-17 14:14:14 -08:00
Yao Xiao 9ca82b2fda Add knob for direct IO 2025-01-17 14:11:35 -08:00
neethuhaneesha f4c3565aff
Rocksdb manual flush code changes (#11849) 2025-01-17 12:44:44 -08:00
Syed Paymaan Raza d735250798
Fix the scope of sharded rocks checkpoint determinism flag (#11893) 2025-01-16 22:44:48 -08:00
Zhe Wang cf7c8f41b2
BulkLoad Job Framework and Co-Testing BulkLoad and BulkDump (#11865)
* add bulkload job framework and fix bugs

* add BulkLoadChecksum, fix CI issue

* nits

* nits

* address comments

* mitigate perpetual wiggle to make sure DD can select a valid team to inject data

* fix submitBulkDumpJob and submitBulkLoadJob

* change remoteRoot to jobRoot

* add comments
2025-01-14 11:28:42 -08:00
Syed Paymaan Raza 122cb96b82
Make sharded rocks deterministic in simulation (phase 1) (#11841) 2024-12-18 16:05:04 -08:00
Jingyu Zhou df0fc7d3b8
Fix issues with clang 19 (#11834)
* Fix issues with clang 19

* Fix format

* Ignore --undefined-version for gcc
2024-12-13 14:20:45 -08:00
neethuhaneesha 1f7a9f4768
Manual flush if the rocksdb flush does not happen within a time interval. (#11791) 2024-11-19 11:57:32 -08:00
neethuhaneesha 5be60d50d3
Histogram sample rate updated to 1. (#11793) 2024-11-19 11:53:16 -08:00
Zhe Wang ca4ab1eca9
Fix traceTooManyEvents and externalTimeouts in BulkLoad test (#11769) 2024-11-11 11:05:43 -08:00
Yao Xiao 7290369aac
Use a single iterator pool for all physical shards. (#11699)
* Rewrite iterator pool.

* simulation fix
2024-10-15 17:28:54 -07:00
Yao Xiao 83dd1f202e
Fix block cache size error and improve logging. (#11681) 2024-09-24 13:08:31 -07:00
Yao Xiao 289d02899f
Add knobs for caching index blocks. (#11650) 2024-09-11 22:58:26 -07:00
Zhe Wang 5ee0db13e6
Fix external timeout with ShardedRocksDB and re-enable ShardedRocksDB in simulation tests (#11638)
* speedup sharded rocksdb in simulation

* re-enable shardedrocksdb and disable physical shard move
2024-09-08 10:57:55 -07:00
Zhe Wang 74990e44bd
Bulk Loading Framework (#11369) 2024-07-23 14:57:28 -07:00
Yao Xiao 1791d07be1
Improvements (#11363) 2024-05-15 09:04:50 -07:00
neethuhaneesha fa15b9df49
RocksDB memtable max range deletions knob update. (#11386) 2024-05-13 15:54:43 -07:00
Yao Xiao 9789c7f4ff
async io (#11325) 2024-04-22 14:20:11 -07:00
neethuhaneesha ed7a275231
Rocksdb caching knob options. (#11282) 2024-04-17 10:09:14 -07:00
Yao Xiao be3dcbde62
Sharded RocksDB knob changes. (#11291) 2024-04-16 11:15:08 -07:00
Yao Xiao de5cc85c28
block cache usage (#11251) 2024-03-14 16:15:38 -07:00
Yao Xiao 19e3f3e2dd
Disable compaction compaction for newly added shard. (#11238)
* Disable compaction compaction for newly added shard.
2024-03-07 14:41:53 -08:00
neethuhaneesha 7db980e185
Rocksdb in-memory data structures protection checksums. (#11206) 2024-02-19 16:46:12 -08:00
Yao Xiao 13efe686f1
Compaction knobs & metrics (#11187) 2024-02-09 11:34:13 -08:00
neethuhaneesha 73e40985b1
Throttle commit on rocksdb flush state and some rocksdb knob changes. (#11177) 2024-02-08 10:14:04 -08:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Zhe Wang 02182d556a
add omitted checksum for rocksdb (#11169) 2024-02-01 18:33:14 -08:00
Yao Xiao 55d88c17c9
Rename knobs and clean up some trace events. (#11135) 2024-01-17 16:26:26 -08:00
Yao Xiao af106e5bda
Update rocksdb knobs. (#11069) 2023-11-16 13:53:12 -08:00
Yao Xiao e7aa0333a9 Update RocksDB options. 2023-11-08 14:09:31 -08:00
neethuhaneesha 220ad87cc4
Rocksdb new options configuration (#11048) 2023-11-03 13:45:03 -07:00
Yao Xiao 33a29ddd85
Upgrade RocksDB version and disable CF range deletion optimization. (#11045)
* Upgrade RocksDB version and disable CF range deletion optimization.wq

* Disable iterator.
2023-11-02 17:25:11 -07:00
Jingyu Zhou 1896e5cd46 Fix an unitialized variable
Valgrind complains this for RecentRocksDBBackgroundWorkStats event.
2023-10-09 15:13:02 -07:00
Yao Xiao b20dcf23a9
Support periodic compaction for sharded rocksdb. (#10815) 2023-08-25 15:38:01 -07:00
Yao Xiao c63ee571e5
Export file metrics and add knob for file size multiplier. (#10785) 2023-08-16 11:27:33 -07:00
Zhe Wang 5868173a3e nits 2023-08-10 16:51:28 -05:00