Commit Graph

453 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
Zhe Wang ee0cd50c7c
Reject Range Lock/Unlock Requests with Conflicting Range, User, or Lock Type (#12047)
* fix range lock

* make bulkload workload correct

* fix bugs and improve test coverage

* nits

* address comments

* nits

* address comments
2025-03-21 16:59:52 -07:00
Zhe Wang a345d66ec3
A Couple of Fixes and Improvements for BulkLoad/Dump (#12040) 2025-03-19 09:00:36 -07:00
Zhe Wang eb0d9f2028
Add Verbose Level for BulkLoad Trace Events (#12034)
* add level for DDBulkLoad except for datadistribution

* nits
2025-03-14 19:15:41 -07:00
Zhe Wang 6ae46b4917
BulkLoadJob Should Not Schedule Completed BulkLoadTask (#12030)
* make bulkload job manager logic clear

* bypass task if the task has been completed

* improve scheduleBulkLoadJob
2025-03-14 14:52:33 -07:00
Zhe Wang 10fecd0a4e
Add Error Message To BulkLoadJob Metadata (#12024)
* add error message to bulkload metadata

* remove TODOs and add error message for bulkload job manifest map creation failures

* nits
2025-03-13 10:02:39 -07:00
Michael Stack 6ee6e0bd7f
Edit of bulkload/bulkdump cli. (#12012)
* fdbcli/BulkDumpCommand.actor.cpp
* fdbcli/BulkLoadCommand.actor.cpp
 Print out the bulkdump description rather than usage so user
 has a chance of figuring out what it is they entered incorrectly.
 Make bulkdump and bulkload align by using 'cancel' instead of
 'clear' in both and ordering the sub-commands the same for
 bulkload and bulkdump.  Add more help to the description.
 Bulkload was missing mention of the jobid needed
 specifying a bulkload.
* documentation/sphinx/source/bulkdump.rst
 s/clearBulkDumpJob/cancelBulkDumpJob/

Co-authored-by: stack <stack@duboce.com>
2025-03-11 08:52:13 -07:00
Zhe Wang 79a38c1dc0
Fix RangeLock in BulkDump Test and Avoid Memory Copy For Async Read/Write Bulk Files (#12007) 2025-03-10 15:13:29 -07:00
Zhe Wang 21b87ef6c8
Improve Range Lock and Add Documentation (#11986)
* rangelock doc

* nits

* fix ci

* fix ci

* nits

* address comments

* nits

* nit

* make read lock exclusive

* fix

* fix CI

* improve doc

* fix bug

* address simulation failues

* fix bugs

* nits
2025-03-07 14:11:23 -08:00
Zhe Wang 8142ebd029
Add BulkLoad History (#11992)
* add bulkload history

* address comments

* address comments
2025-03-04 18:50:08 -08:00
Zhe Wang 8da2a54f4d
Add BulkloadJob Cancellation (#11976)
* add bulkload cancellation

* reduce frequency of job cancellation in tests

* fix bulkload assert failure

* nits

* fix busy loop in bulkload/dump workload

* fix workload

* but

* address comments and CI failures

* add task count trace event
2025-02-27 20:34:53 +00:00
Zhe Wang 2116547ad3
Improve BulkDump Implementation (#11974)
* bulkdump code refactor

* fix bugs

* improve
2025-02-26 13:58:45 -08:00
Zhe Wang 5cce92dcac
Simplify BulkLoad Job Metadata (#11959)
* address comments in the PR 11952

* code refactor and simplification

* avoid task outdated in DDBulkLoadJobExecute

* nit

* fix CI issue
2025-02-25 10:57:22 -08:00
Zhe Wang 94faec13d5
Enable BulkLoad Job to Give Up Unretrievable Task and Fix DDStuck Bug (#11952)
* enable bulkload job to give up unretriable task

* fix ddstuck bug
2025-02-17 17:27:32 -08:00
Zhe Wang d141eea3e1
Allow BulkLoadEngine to Handle Non-Retriable Task (#11950)
* enable-bulkload-engine-accept-unretriable-task

* nit and fmt

* fix bug
2025-02-14 10:52:29 -08:00
Zhe Wang e070698ed0
DataMove Should Decide BulkLoading After Old DataMove Actor Has Been Cleared (#11947)
* fix bulkload bug

* fix CI
2025-02-13 15:35:55 -08:00
Zhe Wang 9195f78bec
Bulkload FDBCLI Command (#11886) 2025-01-15 09:27:59 -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
Zhe Wang d3532e4478
Improve BulkLoad/Dump implementation (#11842)
* Improve BulkLoad/Dump implementation

* make bulkload test data folder inside simfdb folder

* simplify code

* use manifest in bulkdump metadata

* use manifest in bulkload

* apply bulkload fileset to bulkload and fix bugs of bytesampling value generation

* remove BulkDumpFileFullPathSet

* address comments

* address comments

* address comments
2025-01-06 13:02:23 -08:00
Zhe Wang 1ae1f07fb6 address comments 2024-12-03 22:12:31 -08:00
Zhe Wang f0c964f8ad address comments 2024-12-03 22:01:07 -08:00
Zhe Wang ad0f48cba2 add fdbcli support and fix bugs 2024-12-03 22:01:07 -08:00
Zhe Wang 2d93ac7f24 one bulkdump job at any time 2024-12-03 22:01:07 -08:00
Zhe Wang f6be4a4b94 bulkdump generate global manifest 2024-12-03 22:01:07 -08:00
Zhe Wang 3bb2919dec fmt 2024-12-03 22:01:07 -08:00
Zhe Wang 4b2fe52aed add more comments 2024-12-03 22:01:07 -08:00
Zhe Wang 3bc612e286 add bulkdump metadata and manifest 2024-12-03 22:01:06 -08:00
Zhe Wang c54696f617 add bulk dump mode 2024-12-03 22:01:06 -08:00
Zhe Wang 612ba0affd add bulkdump metadata and management api and test files 2024-12-03 22:01:06 -08:00
Zhe Wang 42e17d8bd1
BulkLoading Use RangeLock (#11741)
* use range lock in bulk load

* refactor BulkLoading workload and nits

* add background traffic

* nits

* address comments
2024-10-31 12:58:13 -07: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
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
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Zhe Wang 74990e44bd
Bulk Loading Framework (#11369) 2024-07-23 14:57:28 -07:00
Jingyu Zhou d9e4c49503 Fix more -Wunused-variable warnings 2024-07-17 15:35:49 -07:00
Johannes M. Scheuermann 64b45088ae Make sure server list is validated against the excluded localites 2023-10-24 10:28:23 +02:00
Jingyu Zhou ad259d48cf
Merge pull request #11001 from jzhou77/main
Fix RemoveServersSafely workload timeout error
2023-10-23 09:26:33 -07:00
Johannes M. Scheuermann fa1fd913a6 Issue get worker request concurrently 2023-10-20 10:26:32 +02:00
Jingyu Zhou f99a8151a0 Fix RemoveServersSafely workload timeout error
This workload can have timeout error when using locality-based exclusion. The
sequence is:

1. RemoveServerSafely workload exclude locality by processid
2. Attrition reboots the target process, thus changing the processid, because
processid is generated for each worker process at fdbd()
3. RemoveServerSafely waits for the process exclusion, which never succeed
4. Timeout

The fix monitors processid locality changes and reissue the exclusion with the
correct locality.

To reproduce:
seed: -f ./tests/fast/SwizzledRollbackSideband.toml -s 879108103 -b on
commit: a3dbd4baf release-7.1
2023-10-19 21:46:44 -07:00
Johannes M. Scheuermann 05383066b4 Make sure the get all excluded servers method returns servers that are excluded based on locality 2023-10-19 10:06:29 +02:00
William Dowling 0f752473be
Merge branch 'main' into radixtree-production 2023-09-25 09:52:20 +02:00
Zhe Wang 7e8f326277
Audit storage for specific engine (#10781)
* audit storage for specific engine

* fix getStorageType

* fix budget of skipAuditOnRange

* fix budget in scheduleAuditOnRange

* fix CI error

* improve trace events

* address comments
2023-08-23 10:51:24 -07:00
Zhe Wu ab4ae712e8 Add PerpetualWiggleStorageMigrationWorkload documentation. 2023-08-10 09:35:57 -07:00
Zhe Wu 863038a44c Add improvement for initializing storage server using new perpetual_wiggle_storage_engine config 2023-08-10 09:35:57 -07:00
Zhe Wang 3426fc3c1a
Add DD Security Mode (#10646)
* dd-security-mode

* address comments

* cleanup

* revise tr option set in loadAndUpdateAuditMetadataWithNewDDId

* address comments

* reset auditStorageInitStarted before DD init

* decouple audit resume and audit launch

* audit launch new request should wait for resuming existing requests

* address comment/clean up/fix

* fix

* fix initAuditMetadata retry

* fix initAuditMetadata retry should reset tr
2023-07-21 17:06:25 -07:00
William Dowling 8625eb68b0 Allow both memory-radixtree and memory-radixtree-beta modes 2023-07-06 14:51:23 +02:00
William Dowling 3ea1ba1648 Remove beta status from RadixTree storage engine 2023-07-05 17:54:54 +02:00
Hui Liu 630013cfd9
Fix MoveKeysClean.toml failure (#10470) 2023-06-13 08:45:03 -07:00
Zhe Wang f8f8f72c4e
Add audit storage cancellation (#10386)
* list audits

* cancel audits and corresponding tests

* make audit storage dblock aware

* increase audit retry since we are able to cancel

* fix updateAuditState and fdb github ci

* fmt

* fix fdbcli audit_storage and fix CI issue

* fix fdb cli

* address comments

* fmt
2023-06-06 14:29:53 -07:00
A.J. Beamon ccf61ac2e5 Do not allow changing the coordinators to a set that is unreliable, because otherwise we could delete our coordinated state 2023-05-03 15:03:03 -07:00