Commit Graph

1063 Commits

Author SHA1 Message Date
michael stack 9422856d04 Fix BulkDump timeout causing backup to never become restorable
- Remove remoteRecovered() wait for BulkDump in HA configurations
  BulkDump is read-only and doesn't need the remote DC to be ready.
  This was causing hangs when remote DC couldn't form teams.

- Increase bulkdump_job_timeout from 300 to 600 seconds
  The 300 second timeout was too short - BulkDump was taking ~311s
  to complete, causing the backup task to not write the snapshot file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:35:09 -08:00
michael stack a13044e28e Simplify. Remove unrelated negative test 2026-01-30 11:20:42 -08:00
michael stack 3bf6d77ad0 Fix BulkLoad/BulkDump for HA and small clusters 2026-01-28 13:42:33 -08:00
Jingyu Zhou 2d2a2144f4
Update copyright years to 2013-2026 (#12653)
No functional changes.
2026-01-22 10:49:41 -08:00
Michael Stack 564e95b681
Integrate BulkDump/BulkLoad with backup/restore system (#12608)
* Integrate BulkDump/BulkLoad with backup/restore system

This commit adds the ability to use BulkDump for creating backup snapshots
and BulkLoad for restoring them, providing faster backup/restore operations
for large databases.

Key changes:
- Add BulkDumpTaskFunc to create SST file snapshots during backup
- Add BulkLoadRestoreTaskFunc to restore from BulkDump snapshots
- Store bulkDumpJobId in snapshot metadata for restore coordination
- Add snapshotMode parameter (0=RANGEFILE, 1=BULKDUMP) to control backup type
- Add useRangeFileRestore parameter to control restore method
- Add CLIENT_KNOBS for configurable job timeouts
- Add test assertions to verify BulkDump/BulkLoad execution
- Check for existing running jobs to avoid conflicts when multiple agents run
- Properly scope state variables for error handling in Flow actors

New test: tests/slow/BackupS3BlobBulkLoadRestore.toml

* Update design/bulkload-restore-integration.md
2026-01-21 21:29:23 -08:00
Michael Stack aa35d6cc29
Add restore validation feature: restores to special keyspace allowing validating backup/restore in single cluster (space willing) (#12573)
* Add restore validation feature with simplified backup gap fix

Implements restore validation using audit_storage to verify backup/restore
correctness. Includes a minimal fix for the backup gap bug.

Key components:
- ValidateRestore audit type: compares source keys against restored keys
  at \xff\x02/rlog/ prefix in storage server
- DD audit fixes: propagate validation errors, handle DD failover correctly
- RestoreValidation and BackupAndRestoreValidation workloads for testing
- Simplified backup gap fix: prevent snapshot from finishing in the same
  iteration it dispatches the last tasks (single flag + one check)
2026-01-07 15:23:02 -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 668450f22e
Delete Storage Cache Server feature (#12486)
* Initiate deletion of storage cache feature.  This is rough and is mostly done by commenting out code in case backtracking is needed.  Compiles.  Not tested.

* fix some test errors about cache consistency check options which we no longer care about

* design/feature-status.md: Storage Cache status updated to `has been deleted`.

* Delete it for real

* disable BackupS3BlobCorrectness.toml because it fails a lot

* In the interest of a single-purpose, clean diff, put back a removed dumb warning that generates compile error noise

* fix formatting

* Add TODO comment to remove tagLocalityLogRouter

* fix typo
2025-10-21 15:04:39 -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
Zhe Wang 442e150401
BulkDump a Range (#12288)
* add trace event to notify users when giving up sst file ingestion due to task range not aligned with manifests

* Testing bulkdump per range

* address comments

* use retryable

* dedup code in getBulkLoadJobFileManifestEntryFromJobManifestFile
2025-08-11 10:37:06 -07:00
Zhe Wang 9d48416832
BulkLoad a Range (#12252)
* enable bulkload a range

* nits
2025-07-31 15:34:38 -07:00
gxglass 7246d10455
Misc cleanups and comment updates from reading code (#12280)
* Remove code which has been behind #if 0 for > 5 years

* Separate open() from read() failures, and avoid potentially leaking fds

* Minor refactor to remove some distracting #ifdefs

* Add comment

* Add some META-FIXME comments about suspicious dated FIXME comments.
Also add one long straight up FIXME comment about a commented out code block
that looks suspicious.  Discuss other ways that the code in question could be structured.

* Add a link to a doc page describing DEBUG_DETERMINISM

* Format updates

* Save 2 lines of code

* Remove useless comment

* Remove long-commented out code; remove useless comments; request a comment

* Remove obvious comments; request comments about non-obvious stuff

* Request comments explaining protocols

* Comment updates

* Rename tlog-spilling.md.html to tlog-spilling.md so that github renders it

* Remove broken link

* Revert "Remove broken link"

This reverts commit 6f90eff6ce.

* Revert "Rename tlog-spilling.md.html to tlog-spilling.md so that github renders it"

This reverts commit b57a922489.

* Remove broken link and unnecessary assertion about required background; add an explanation for why the user is reading raw markdown

* Update provisional comment, and remove long-commented out code which we think is not necessary.

* Add one small explanatory comment

---------

Co-authored-by: Gideon Glass <gglass_glass@apple.com>
2025-07-31 10:05:44 -07:00
Zhe Wang ae2ee24a40
A BulkLoad Job Should Use One Range Lock (#12232)
* bulkload job should use one range lock

* fix ctest

* update cli
2025-07-14 11:40:19 -07:00
Zhe Wang 717bdb7944
avoid busy loop (#12157) 2025-05-15 23:14:27 -07:00
Dan Lambright 588c2a5f04
Use 'TLog' rather than 'Tlo' as standard for logs (#12142)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-05-09 21:25:20 -07:00
Zhe Wang 70084dbe13
BulkLoad Load Balance Based on DataMove Busy Map (#12137)
* bulkload load balance in ddqueue

* cleanup

* address comments

* nit

* bug fix

* nit

* address comments

* avoid scheduler busy loop

* address comments

* address comments
2025-05-08 11:28:27 -07:00
Zhe Wang 5abba50985
job overwrite task root path (#12138) 2025-05-08 10:04:59 -07:00
Zhe Wang 2e3f23e323
DD BulkLoadTask Load Balance (#12103)
* bulkload load balance

* improve bulkload task submission efficiency

* address comments

* address comments

* cleanup
2025-04-25 14:44:45 -07:00
Zhe Wang 50c0d084a3
Add Option to Turn Off Failure Injection to BulkLoad Process (#12096)
* add option to turn off failure injection to bulkload process in simulation

* nit
2025-04-21 17:38:25 -07:00
Zhe Wang 5812f32130
disable-encode-shard-location-metadata-in-blob-feature (#12053) 2025-03-26 19:26:59 -07:00
Zhe Wang 6fa83c231d
audit replica should not read empty range to check (#12043) 2025-03-19 18:38:59 -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 0e736c68e7
Allow One BulkloadTask Do Multiple Manifests (#12036) 2025-03-17 11:45:15 -07:00
Zhe Wang d5946157f0
avoid shard merge when bulkload (#12035) 2025-03-15 13:20:51 -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 9f5fdd0bea
Add BulkLoad Task Count to BulkLoad FDBCLI Command (#12029)
* change a event name

* add bulkload task count to fdbcli

* nit
2025-03-13 21:07:47 -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
Zhe Wang 529db211b2
persist bulkload task count in bulkload job (#12022) 2025-03-12 15:35:26 -07:00
Zhe Wang 51ad8428e0
A Couple for Fixes for BulkDump and RangeLock (#12013)
* fix lockrange test and improve bulk dump

* fix bulkdump stuck error

* remove unnecessary yield when read/write bulk files

* remove unnecessary string creation in read/write bulk files
2025-03-11 15:58:01 -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
Michael Stack e1138c30ee
Make bulkload file reads and writes async and memory parsimonious (#11997)
* * fdbclient/S3Client.actor.cpp
 Change field names so capitialized (convention)
 Add duration as field to traces.

* fdbserver/BulkLoadUtil.actor.cpp
 When the job-manifest is big, processing blocks
 so much getBulkLoadJobFileManifestEntryFromJobManifestFile
 fails.

* Make bulkload file reads and writes async and memory parsimonious.
In tests at scale, processing a large job-manifest.txt was blocking
and causing the bulk job to fail. This is part 1 of two patches.
The second is to address data copy added in the below when we
made methods ACTORs (ACTOR doesn't allow passing by reference).

* fdbserver/BulkDumpUtil.actor.cpp
 Removed writeStringToFile and buldDumpFileCopy in favor of new methods
 in BulkLoadUtil. Made hosting functions ACTORs so could wait on
 async calls.

* fdbserver/BulkLoadUtil.actor.cpp
 Added async read and write functions.

* fdbserver/DataDistribution.actor.cpp
 Making uploadBulkDumpJobManifestFile async made it so big bulkloads
 work.

* fix memory corruption in writeBulkFileBytes and fix read options in getBulkLoadJobFileManifestEntryFromJobManifestFile

* If read or write < 1MB, do it in a single read else do multiple read/writes

* * packaging/docker/fdb-aws-s3-credentials-fetcher/fdb-aws-s3-credentials-fetcher.go
 Just be blunt and write out the credentials. Trying to figure when the
 blob credentials have expired is error prone.

Co-authored-by: michael stack <stack@duboce.com>
Co-authored-by: Zhe Wang <zhe.wang@wustl.edu>
2025-03-06 10:43:04 -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 5f9f5358a8
Improve BulkLoad TraceEvent (#11971)
* improve bulkload event

* fmt
2025-02-25 14:37:21 -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
neethuhaneesha 62cc2a3edf
Migration to consider wiggling based on perpetualStorageEngine and not on configureStorageEngine (#11917) 2025-02-12 11:25:16 -08:00
Zhe Wang 277e82b79a
improve-bulkload (#11941) 2025-02-11 17:50:13 -08:00
Zhe Wang 961dad0552
Refactor BulkLoad Engine and Improve Trace Events (#11937)
* refactor bulkload engine framework

* add time span measure

* fmt
2025-02-11 12:01:21 -08:00
Zhe Wang d1efff1511
Improve BulkLoad Implementation (#11929)
* improve bulkload code

* address CI

* disable audit storage replica check and distributed consistency check in bulkload and bulkdump simulation test

* fix ci

* disable waitForQuiescence in bulkload and bulkdump tests
2025-02-06 21:25:49 -08:00
Zhe Wang 0f6fa090ce
Bulkload Engine Support General Storage Engine and Fix BulkLoad Bugs (#11898)
* bulkload support general engine and fix bugs

* add comments

* improve test coverage and fix bug

* nits and address comments

* nit

* nits

* fix data inconsistency bug due to bulkload metadata

* fix ss bulkload task metadata bugs

* nit and fix CI issue

* fix bugs of restore ss bulkload metadata

* use ssBulkLoadMetadata for fetchKey and general kv engine

* cleanup bulkload file for fetchkey

* fix CI issue

* fix simulation stuck due to repeated re-recruitment of unfit dd

* randomly do available space check when finding the dest team for bulkload in simulation

* address conflict

* code clean up

* update BulkDumping.toml same to BulkLoading.toml

* consolidate ss fetchkey and fetchshard failed to read bulkload task metadata

* fix DD bulkload job busy loop bug which causes segfault and test terminate unexpectedly in joshua test

* nit

* fix ss busy loop for bulkload in fetchkey

* use sqlite for bulkload ctest

* fix bulkload ctest stuck issue due to merge and change storage engine to ssd

* fix comments for CC recruit DD

* address comments

* address comments

* add comments

* fix ci format issue

* address comments

* add comments
2025-02-06 12:04:13 -08:00
michael stack aea37ae90d Use s3 if available when running the bulkload test.
It was disabled until we made it so the SS could
talk to s3, included in this PR.

Also finished the bulkload test. It only had the
bulkdump portion. bulkload support was recentlty
added so finish off the test here by adding bulkload
of the bulkdump and then verifying all data present.

Added passing knobs to the fdb cluster so available to the
fdbserver when it goes to talk to s3. Also added passing
SS count to start in fdb cluster.

* fdbclient/tests/fdb_cluster_fixture.sh
 Add ability to pass multiple knobs to fdb cluster
 and to specify more than just one SS.

* fdbserver/fdbserver.actor.cpp
 Add --blob-server option and processing of FDB_BLOB_CREDENTIALS
 if present (hijacked the unused, unadvertised --
   blob-credentials-file).

* tests/loopback_cluster/run_custom_cluster.sh
 Allow passing more than just one knob.

* fdbclient/BulkLoading.cpp
* fdbclient/include/fdbclient/BulkLoading.h
 Added getPath

* fdbclient/S3BlobStore.actor.cpp
 Fix bug where we were doubling up the first '/' on a path if
 it had a root '/' already (s3 treats /a/b as distinct from
 /a//b).

* fdbclient/S3Client.actor.cpp
 Fix up of traceevent Types.

* fdbclient/tests/bulkload_test.sh
 Enable being able to use s3 if available.
 Pick up jobid when bulkdumping. Feed it to new bulkload
 method. Add verification all data present post-bulkload.

* fdbserver/BulkLoadUtil.actor.cpp
 Add support for blobstore.

* tests/loopback_cluster/run_custom_cluster.sh
 Bug fix -- we were only able to pass in one knob. Allow
 passing multiple.
2025-01-17 17:29:56 -08:00
Zhe Wang 0bce8bd281
Parallelize Fetching BulkLoad Manifest Metadata (#11884) 2025-01-15 09:28:12 -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 83f42e13d9
Make BulkDump work with S3 (#11822)
* init

* Add bulkdump to blobstore:// (s3)

* cmake/CompileBoost.cmake
 Add boost url. Needed parsing blobstore:// urls.

* documentation/sphinx/source/bulkdump.rst
 Minor edit to allow addition of blobstore target.

* fdbcli/BulkDumpCommand.actor.cpp
* fdbclient/BulkDumping.cpp
 s/blobstore/s3/ -- more generic and aligns with
 how backup/restore refers to "s3" thingies.

* fdbclient/include/fdbclient/S3Client.actor.h
* fdbclient/S3Client.actor.cpp
 Add batch upload handler.

* fdbclient/tests/seaweedfs_fixture.sh
 Add  run seaweed method. Also look for
 weed and if installed use it else download.

* fdbserver/BulkDumpUtil.actor.cpp
 appendToPath does the right thing when passed an URL
 Add bulkDumpTransportBlobstore_impl.
 Add upload to blobstore.

* tests/loopback_cluster/run_custom_cluster.sh
 Complain if unrecognized arguments.

* Add ctest for bulkload with simple bulkdump test for now.

* Add new test to ctest list

* fix bugs

* nit

* nits

* nits

---------

Co-authored-by: stack <stack@duboce.com>
2024-12-18 13:29:36 -08:00