Commit Graph

585 Commits

Author SHA1 Message Date
Jingyu Zhou b2dffde9f4
Separate backup and restore into two workloads [release-7.4] (#12172)
* Separate backup and restore into two workloads

This allows more flexible testing as well as cleaner code.

* Keep sim backup agents after the Backup workload

Otherwise, the Restore workload doesn't have agents, thus can't make progress.

100k partitioned restore tests, i.e., BackupAndRestore.toml and
BackupCorrectnessPartitioned.toml:
  20250311-200411-jzhou-9d34d22d5225d6fe

* Remove TransformPartitionedLog parameter from restore()

Instead, infer the flag from backup description.

* Add usePartitionedLog option for Backup workload

This allows us to specify old or new style of backup to be used. Added two
tests that switch between them and randomly choose one backup to restore.

20250314-034057-jzhou-c27ca23b6c69cecf

* Enable buggify in these backup tests

20250314-034541-jzhou-13ed090d0b111474

* Disable backup encryptions for two tests

Because we separate backup and restore into two workloads, they may not choose
the same encryption option, i.e., one encrypted and the other unencrypted.

20250320-013757-jzhou-12b4c8e4504ffd96

* A small refactor

20250321-222324-jzhou-fdcd6f145f3ac0f8

* Fix backup agent being randomly paused

This can cause subsequent backup and restore workload to fail.

20250322-040333-jzhou-15c32299d18f4456

100k backup tests:
20250322-040453-jzhou-2bdb4e0ddc265632

* Refactor RestoreLogDataPartitionedTaskFunc::_execute

* Batch multiple versions together when applying backup mutations

If done version by version, it is inefficient and causes the task to be
interrupted in simulation, thus never finishing the RestoreLogDataPartitionedTaskFunc.

20250324-040712-jzhou-cd8501d3890a6b56

100k backup tests:
20250324-040751-jzhou-8cec93182e6d3acb

* Correct how many log bytes are written during restore

20250326-182125-jzhou-375d243c097c3b5a
20250325-221139-jzhou-5dac71c4525d414c

100k backup tests:
20250326-162525-jzhou-f08e3fc12887a3e9

* Skip consistency check and Quiescence for backup tests

Do these checks in the last [[test]] specified in TOML file.

* Disable backup workers when no active partitioned backups

Currently, when submitting backup, backup workers will be enabled for partitioned backups.
However, we didn't clear the backup worker setting if no partitioned backup is active,
which will cause backup workers to be recruited, but doing nothing.

This PR changes the behavior so that when submitting, aborting, or discontinuing
backups, we'll disable backup workers if there is no active partitioned backup jobs.

20250517-162642-jzhou-4966348e89f1794d
20250517-044345-jzhou-f02f7defca3ea010

* Fix a test assertion failure

The continuous log end version could be less than min restorable version, when
the snapshot is a single version. I.e., min and max restorable versions are the
same.

20250519-042009-jzhou-88a2e0c67e8bed92

100k backup tests 20250519-155545-jzhou-c0aeaaf4a933cff9

* Fix tests where backup agents are not resumed

Also consolidate key updates for pausing backups.

20250520-175022-jzhou-10106ade7e0ad74f

100k backup 20250520-175208-jzhou-15255334e0c57eec
2025-07-08 12:27:53 -07:00
Dan Lambright fee87e03b2
Add compile time switch NO_MULTIREGION_TEST. (#11931)
* Add compile time switch NO_MULTIREGION_TEST. When set, simulation tests
will not create configurations with more than one region. Tests requiring
multiple regions are ignored.

* While the RUN_IGNORED_TESTS setting allows running tests that have been
marked as ignored, this should not apply to multiregion tests.  Multiregion
tests must be completely disabled if the NO_MULTIREGION setting is enabled.

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-02-13 14:38:41 -05:00
Zhe Wang b0ff9187ad
fix shardedrocksdb knob and add ENFORCE_SHARDED_ROCKSDB_SIM_IF_AVALIABLE (#11916) 2025-01-29 23:40:37 -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
Syed Paymaan Raza 5a615df85f
Make rocksdb deterministic in simulation (#11790) 2024-11-19 15:42:15 -08:00
Dan Lambright 31d67404a3
Do not choose two_satellite_fast in simulation tests when version vector unicast enabled. (#11765)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-11-08 16:44:09 -05:00
Syed Paymaan Raza 5f480947ad
[fdbserver] Gray failure and simulator improvements related to remote processes (#11717)
* [fdbserver][simulator] Add remoteDesiredTLogCount option

* [fdbserver][simulator] Allow explicitly specifying number of stateless classes in each DC

* [fdbserver][gray_failure] RemoteTLog lagging SS simulation test

* [fdbserver][gray_failure] Consider remote processes + CC inter/intra latency awareness

* [fdbserver][cc] Make processInSameDC O(1)
2024-10-23 13:15:29 -07:00
Zhe Wang ab93517da4 address comments 2024-10-10 13:11:16 -07:00
Zhe Wang fcb0030883 add probability that Memory gets selected 2024-10-10 11:24:40 -07:00
Zhe Wang 7d95b87483 improve the probability that sharded rocksdb is selected in simulation tests 2024-10-10 09:48:23 -07:00
Jingyu Zhou 70f9440e7d
Merge pull request #11648 from sbodagala/main
Refactor version vector related recovery version computation logic
2024-09-23 14:06:21 -07:00
Jingyu Zhou 2313fdaa0e
Add rocksdb, sharded rocksdb to configure workload (#11654)
* Add rocksdb, sharded rocksdb to configure workload

Also remove mentioning of ssd-redwood-1-experimental.

* Fix test failure when SHARD_ENCODE_LOCATION_METADATA is off
2024-09-12 21:03:06 -07:00
Sreenath Bodagala 9ebb1b7391 - Disable logWriteAntiQuorum when version vector is enabled
- Refactor the version vector related recovery version computation
logic in order to make it work better with the recovery restart logic
2024-09-11 19:51:41 +00: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
Zhe Wang 3305d2e3ee
fix storage engine selection (#11586) 2024-08-20 09:24:30 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Zhe Wang dcebf1a9bc
Add extraStorageMachineCountPerDC config to simulation (#11529) 2024-07-26 09:05:41 -07:00
Zhe Wang 74990e44bd
Bulk Loading Framework (#11369) 2024-07-23 14:57:28 -07:00
Zhe Wang e9505506df
add consistency-check-urgent-mode to tester process class (#11484) 2024-07-09 13:21:37 -07:00
Xiaoge Su 3e3eee98fc fixup! Reformat source 2024-06-17 11:41:06 -07:00
Xiaoge Su afc04366fb Rewrite BUGGIFY related code
This is a rewrite of BUGGIFY function/macros. Seems the performance
improved a lot during the simulation, e.g.

fdbserver -r simulation -b on -f ../CycleTest.toml -s 99438

Without this patch:

Unseed: 54646
Elapsed: 494.091327 simsec, 14.586831 real seconds

With this patch:

Unseed: 54646
Elapsed: 494.091327 simsec, 12.580612 real seconds

I expected the improvement but did not expect a ~13% improvement.
2024-06-17 11:41:06 -07:00
Xiaoge Su 0b96d52eec fixup! Remove a stateful ASSERT statement 2024-06-17 11:41:06 -07:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
He Liu b8f1670a0e
Physical shard move tss (#11057)
* Refactored newDataMoveId() and decodeServerKeysValue().

* Enabled physical shard move for tss.

* Added unit test & cleanup.

* clean up test configs.
2023-11-13 11:34:07 -08:00
William Dowling 0f752473be
Merge branch 'main' into radixtree-production 2023-09-25 09:52:20 +02:00
Xiaoge Su cb99a8f56f fixup! Reformat source 2023-08-28 14:56:39 -07:00
Xiaoge Su 5a12d12774 fixup! Enable sharded RocksDB storage engine for PhysicalShardMove 2023-08-28 14:56:39 -07:00
Xiaoge Su 47efd890ad Better error report when specified storage engine is not supported 2023-08-22 15:52:08 -07:00
Jingyu Zhou a4e4ab6411 Fix a crash error 2023-08-09 13:44:52 -07:00
Yi Wu fff6b745d2 EaR: turn down the probability of enabling encryption in simulation 2023-08-02 10:11:18 -07:00
Xiaoge Su d75b167bf1 fixup! Reformat source 2023-07-27 14:14:31 -07:00
Xiaoge Su 0036bab8a4 Rename SSD_ROCKSDB_EXPERIMENTAL to WITH_ROCKSDB 2023-07-27 14:04:10 -07:00
Xiaoge Su c5a8642706 fixup! fix the compile error 2023-07-27 10:56:33 -07:00
Xiaoge Su e655feb07a Remove WITH_ROCKSDB_EXPERIMENTAL, enforce using enum for StorageEngine type in simulation 2023-07-27 10:31:48 -07:00
Xiaoge Su fac2f09641 fixup! Reformat source 2023-07-26 16:00:25 -07:00
Xiaoge Su 874642a15b fixup! Add message when a storage engine is randomly chosen 2023-07-26 15:46:53 -07:00
Xiaoge Su b40ba09303 Add a flag for enabling/disabling RocksDB storage engine in simulations
Previously we have to modify SimulatedCluster source code to
enable/disable RocksDB storage engine in simulations. Now it is doable
by using cmake flags/ccmake gui by setting the OPTION

    ENABLE_ROCKSDB_IN_SIMULATION

ON/OFF.
2023-07-26 15:42:59 -07:00
Josh Slocum 8ce1796a7a
Stable http ports (#10604)
* Ensuring HTTP ports are stable for the same servers, and adding a test http server that ensures no other users accidentally talk to it

* fixing warning with werror

* more werror fixes
2023-07-13 14:06:52 -04:00
Yi Wu b16c7518b4 fix worker server reporting IoTimeoutError as injected fault 2023-07-05 13:30:56 -07:00
William Dowling 3ea1ba1648 Remove beta status from RadixTree storage engine 2023-07-05 17:54:54 +02:00
Xiaoxi Wang 6afd585a3c Address review: mock assertion and shard number condition 2023-06-07 22:01:33 -07:00
Xiaoxi Wang e3c9a1a7f5 Disable same address detection in mock DD and implement MockStorageServer::getStorageMetrics 2023-06-07 22:01:33 -07:00
Xiaoxi Wang e139f5bf90 Correctly handle buggify errors in MGSWaitStorageMetrics 2023-06-07 22:01:33 -07:00
Xiaoxi Wang b444eb1f22 Make DataDistributor use the configuration object in DDSharedContext; Change Mock test config 2023-06-07 22:01:33 -07:00
He Liu 8ad7ec6fdf
Psm ss (#9817)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* Refactored ShardedRocks checkpoint/restore for psm.

* Complete ShardedRocks::restore.

* dismiss operation_obsolete, and throw actor_cancelled.

* Validate checkpoint when !asKeyValues.

* fmt.

* Don't read from uninitialized physical shard.

* Resolved commments.

* cleanup.

* Added verify_checksum_before_restore for ShardedRocks.

* Added ShardedRocksDB checkpoint/restore unit test.

* Populate CheckpointMetaData::dir in RocksDB.

* Rename MovingIn as Adding.

* Added StorageServerUtils.

* Added physical shard move in SS.

* Fix on ApplyMetaData, doFetchFile error handling etc.

* Debugging incorrect shard size.

* Create/delete checkpoints only when Physical shard move is enabled.

* Added back SHARD_ENCODE_LOCATION_METADATA.

* Fixed bytesSample incorrect issue.

Essentially dedicated CheckpointRocksDBCF as key-value based checkpoint, will need to add a new format for the file-based checkpoint.

* Cleanup.

* Cleanup & compile rocksdb with 8.1 branch.

* clean up.

* clean up.

* Allowed request_maybe_delivered error type in FetchShard.

* Added FDBRocksDBVersion.h.

* Fixed stuck fetchShard.

* Don't create checkpoint on TSS.

* Upgrade to RocksDB 8.1.1

* Cleanup.

* Fixed accidently deleted db_path and name fields.

* Improved trace event.

* Removed redundants from previuos ShardedrocksDB.

* Cleanup.

* cleanup.

* cleanup.

* reanme `state`.

* Cleanup.

* Removed excessive TraceEvent.

* * Fixed shardMap race condition on different threads
* Added *Stats, logging data move rates.
* Added `DD_PHYSICAL_SHARD_MOVE_PROBABILITY` to support hybrid data move.

* Resolved comments.

* fmt.

* Use physical shard move in PhysicalShardMoveTest.

* Enforce physical-shard-move for PhysicalShardMoveTest.

* fmt
2023-05-23 11:18:35 -07:00
A.J. Beamon 712fefd59f
Merge pull request #10213 from sfc-gh-ajbeamon/tenant-code-probes
Add code probes for tenant and metacluster code
2023-05-15 12:13:00 -07:00
Josh Slocum 9c081f8a08
Sim http server improvements (#10217)
* Passes existing tests

* adding http unit test for wrong md5 sum

* Added new HTTPKeyValueStore workload to test long-running http clients

* fixing warnings
2023-05-12 16:33:32 -05:00
A.J. Beamon d8141c049d Add code probes for tenant code 2023-05-10 20:44:39 -07:00
Chaoguang Lin 77cd187c21
Fix a corner case failure where rebooting flag is forgot to set to true when the process is executing RebootProcessAndSwitch (#10195) 2023-05-09 16:18:48 -07:00