Commit Graph

1137 Commits

Author SHA1 Message Date
gxglass 2f0158b4c2
Remove dead code left behind by blob worker, change feed, and metacluster feature deletions (#13119)
Prior efforts (PR#12435, PR#12470, PR#12486, PR#12583, PR#12667, PR#12903) removed some experimental features. This PR cleans up some leftover pieces.

I suppose this is basically a matter of historical interest at this point but those PRs were done purely by hand (ok, with like grep and a text editor) i.e. without any AI coding assistance. So it is not surprising that there is a few percent of leftover bits here and there.

Fixes:

Remove monitorBlobWorkers() and blobRestoreCommandActor() declarations that had no implementations (linker bombs if called)
Remove fast_restore from setclass help text (previously directed operators into an ASSERT(false) crash)
Dead knob removal (13 knobs):

12 blob worker ratekeeper knobs (BW_THROTTLING_ENABLED, TARGET_BW_LAG, etc.) and BLOB_WORKER_PAGE_CACHE
Remove bwLagTarget field from RatekeeperLimits and associated plumbing in Ratekeeper
Dead code removal:

4 never-incremented storage server counters (feedBytesFetched, changeFeedMutations, changeFeedMutationsDurable, changeFeedDiskReads)
Assigned-but-never-read nonExpanded variable in StorageServer::addMutation
ClusterNameRef/ClusterName typedefs, RestoreLoader/Applier/Master forward declarations
Dead schema strings (blob_worker_lag, blob_worker_missing, unreachable_blobManager_worker, metacluster_metrics_missing)
Dead cacheKeys*/cacheChange* function implementations in SystemData.cpp
Dead tenant group code in FuzzApiCorrectness.cpp
Dead fdbcli constants (msgClusterTypeKey, msgDataClustersKey) and blobrange history filter
Dead file removal:

contrib/mockkms/ -- unused Go mock KMS server
tests/fast/EncryptionUnitTests.toml -- tests a path (/blobCipher) that no longer exists
2026-04-29 20:15:54 -07:00
Michael Stack 615f79c774
Improve backup/restore/bulkload observability and reliability (#13047)
* Improve backup/restore/bulkload observability and reliability

Restore progress tracking:
- Add sub-phase counts (Submitted/Triggered/Running/TotalTasks) to
  fdbrestore status output so users can see task submission progress
- Add getBulkLoadTaskProgress() to scan task states during restore
- Replace monitorBulkLoadJobCompletion with progress-tracking variant
  that updates RestoreConfig counters every 5 seconds

Backup mode=BOTH fixes:
- Set bulkDumpJobId on BackupConfig so status shows BulkLoad Compatible
- Add bulkDumpSnapshotEndVersion for proper getLatestRestorableVersion
- Fix firstSnapshotEndVersion: only set from rangefile in mode=BOTH
- Skip empty BulkDump snapshots (totalSize=0) in rangefile restore

BulkLoad restore reliability:
- Abort restore immediately when no bulkdump data found (not retry forever)
- Add monitorBulkLoadModeAndSpawnActors so DD picks up bulkload jobs
  submitted after DD initialization (required for restore workflow)

Audit validate_restore fixes:
- Read source data via database transaction instead of local SS to
  avoid missing keys at shard boundaries after bulkload restore
- Add fast-path detection for completely empty baseline or source
- Retry on server_overloaded errors during audit
- Add AUDIT_RESTORE_BATCH_KEY_LIMIT and AUDIT_PROGRESS_PERSIST_BYTES_INTERVAL
  knobs for tuning audit performance

CLI cleanup:
- Combine redundant task lines in bulkload/bulkdump status output
- Remove misleading health score and optimization recommendations
- Raise bulk task stall threshold from 60s to 600s (SST downloads
  from blobstore routinely take 5-10 minutes)

* Address PR review: incrementalBackup check for mode=BOTH, snapshot type label, retry logging

- Add incrementalBackup fallback in getLatestRestorableVersion for mode==2
  (was missing unlike modes 0 and 1)
- Note snapshot type heuristic as imperfect in describe output
- Log retries in getBulkLoadTaskProgress

* Parse snapshot type from filename instead of inferring from heuristic

KeyspaceSnapshotFile now has a snapshotType field parsed from the
snapshot filename (format: snapshot,begin,end,size,type). The type
suffix was already written but discarded during parsing. Now captured
and used for reliable bulkdump vs rangefile identification in
fdbbackup describe output.

* Simplify getBulkLoadTaskProgress: always set LOCK_AWARE, drop lockAware parameter

* Use Transaction instead of ReadYourWritesTransaction in getBulkLoadTaskProgress

Read-only function does not need write tracking overhead.
Uses Transaction* overload of krmGetRanges.
2026-04-24 13:45:38 -07:00
Trevor Clinkenbeard e38baf18ea Fix more clang-tidy warnings 2026-04-15 14:23:33 +00:00
Trevor Clinkenbeard a4aabdceee Update getStorageServers return type to AsyncResult 2026-04-10 18:39:05 -07:00
Trevor Clinkenbeard 49a3ea1d7f Fix invalid getIdmpKeyStatus usage 2026-04-10 18:39:05 -07:00
Trevor Clinkenbeard 9e96bc372f Update getAllRangeLockOwners return type to AsyncResult 2026-04-10 18:39:05 -07:00
Trevor Clinkenbeard 92b43aca09 Update getBulkLoadJobFromHistory return type to AsyncResult 2026-04-10 18:39:05 -07:00
Trevor Clinkenbeard 4bf6184890 Update getAuditStates return type to AsyncResult 2026-04-10 18:39:00 -07:00
Trevor Clinkenbeard 9a39ca2728 Migrate client-side callers 2026-04-02 10:23:26 +00:00
Trevor Clinkenbeard d5c7071a71
Merge pull request #12908 from tclinkenbeard-oai/dev/tclinkenbeard/consistencyscan-interf-coro
Convert `ConsistencyScanInterface.actor.h` to standard coroutines
2026-04-01 08:42:30 -07:00
Trevor Clinkenbeard 99ab284506
Merge pull request #12888 from tclinkenbeard-oai/dev/tclinkenbeard/explicit-void-marker
Add `ExplicitVoid` marker type
2026-03-31 14:34:45 -07:00
Trevor Clinkenbeard 831135bc77 Rename ConsistencyScanInterface.actor.h 2026-03-31 19:03:53 +00:00
Trevor Clinkenbeard 6b5e6c9e40 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/actor-header-rename 2026-03-29 12:41:02 -07:00
Trevor Clinkenbeard b3120d621a Add ExplicitVoid marker type 2026-03-28 12:06:15 +00:00
Trevor Clinkenbeard 9ba44fd75b Rename *.actor.h files without ACTORs 2026-03-27 04:53:43 +00:00
Trevor Clinkenbeard 1e7a1cb575 Rename TagThrottle.actor.h 2026-03-27 04:31:20 +00:00
Trevor Clinkenbeard d477eab73d Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/management-api-coro 2026-03-25 02:14:46 +00:00
Trevor Clinkenbeard 5cf4b48319 Rename ManagementAPI* files 2026-03-24 16:13:35 +00:00
Trevor Clinkenbeard cfebb3c891 Rename AuditUtils* files 2026-03-24 14:23:21 +00:00
Trevor Clinkenbeard 4e79f7a779 Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/small-file-coro 2026-03-23 00:42:12 +00:00
Trevor Clinkenbeard 695526aa48 Rename non-actor files 2026-03-22 03:06:37 +00:00
Trevor Clinkenbeard 72dd0bfd2a Move GlobalConfig.actor.h into GlobalConfig.h 2026-03-21 01:02:41 +00:00
Trevor Clinkenbeard 32bfa7645e
Merge pull request #12814 from tclinkenbeard-oai/dev/tclinkenbeard/misc-actor-file-rename
Convert various files to standard coroutines
2026-03-20 09:51:18 -07:00
Trevor Clinkenbeard 1f664942d7
Merge pull request #12784 from tclinkenbeard-oai/dev/tclinkenbeard/async-result
Create `AsyncResult` class
2026-03-20 09:47:46 -07:00
Trevor Clinkenbeard 96d3f4b1d2 Rename actor files without ACTORs 2026-03-20 08:30:40 +00:00
Trevor Clinkenbeard a6dd5da380 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/expand-make-reference3 2026-03-19 11:17:17 -07:00
Michael Stack 1f75fbe25b
Improve backup/restore observability and status messages (#12729)
* Add BulkDump/BulkLoad observability for backup/restore progress tracking

Progress tracking APIs:
- getBulkDumpProgress() / getBulkLoadProgress() - track tasks, bytes, throughput, ETA
- getBulkDumpOwner() - track job ownership (e.g., which backup owns a bulkdump)
- Owner registration system for backup agents

CLI improvements:
- 'bulkdump status' and 'bulkload status' commands with human-readable output
- Progress display with throughput and ETA

Backup agent integration:
- Register backup as owner of bulkdump jobs
- Show bulkdump/bulkload progress in backup status output

Utility functions (flow/Util.h):
- formatBytesHumanReadable() - "1.23 TB", "456 MB"
- formatDurationHumanReadable() - "2 hours 30 minutes"
- formatBytesProgress(), formatThroughputLine(), formatETALine()

Test coverage:
- verifyBulkDumpObservability() / verifyBulkLoadObservability() in BackupS3BlobCorrectness

Bug fixes:
- Fix format string mismatch crash in FileBackupAgent progress display
- Add empty result guards for krmGetRanges() calls to prevent size_t underflow

* Formatting

* Rebase and formatting

* * cmake/CompileRocksDB.cmake
 Preserve version when find_packge doesn't turn up rocksdb version

* fdbbackup/tests/backup_tests_common.sh
 Wait when mode is 'both' for snapshot to be written.

* fdbclient/BulkLoading.cpp
 Remove extra '/'.

* Output time of bulkload in bulkload history fdcli output as iso8601 instead of seconds since epoch

* Print start time as iso8601 -- readable -- instead of seconds since epoch -- unreadable... And don't crash if not a UUID

* Remove cute graphics.. and bullet characters

* Throw exception if not able to parse backup 'mode'
2026-03-18 21:10:28 -07:00
Trevor Clinkenbeard a3d39697e7 Expand use of makeReference 2026-03-18 09:15:56 -07:00
Trevor Clinkenbeard 1306c2f5a9 Remove unnecessary success calls 2026-03-18 09:00:46 -07:00
Trevor Clinkenbeard bab8dca1fa Remove unnecessary calls to store coroutine 2026-03-18 08:26:43 -07:00
Trevor Clinkenbeard 16eb99a30e Remove RemoteIKeyValueStore 2026-03-16 22:14:40 +00:00
Trevor Clinkenbeard 3f7cfb78eb Use AsyncResult in fdbcli/ExcludeCommand.cpp 2026-03-16 18:34:58 +00:00
Trevor Clinkenbeard 95fee2812f Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/fdbcli-coro2 2026-03-15 21:47:06 +00:00
Trevor Clinkenbeard 282b9fe10b
Merge branch 'main' into dev/tclinkenbeard/modernize-clang-tidy 2026-03-14 19:15:25 -07:00
Trevor Clinkenbeard e7737f7bf6 Enforce new rules 2026-03-14 02:25:26 +00:00
Trevor Clinkenbeard a52d1bbaa9 Enforce two new modernize-* clang-tidy rules 2026-03-13 20:12:14 +00:00
Trevor Clinkenbeard 652f85de07
Add and enforce more `readability-*` `clang-tidy` rules (#12765)
* Add and enforce more readability-* clang-tidy rules

* Revert readability-else-after-return changes
2026-03-12 22:30:38 -07:00
Trevor Clinkenbeard d92be400c7 Fix fdbcli test failures 2026-03-13 03:47:42 +00:00
Trevor Clinkenbeard 4e32384308 Fix formatting 2026-03-12 18:28:57 -07:00
Trevor Clinkenbeard 75b43f918c Remove unnecessary hasErr flags 2026-03-13 01:18:20 +00:00
Trevor Clinkenbeard c0e0eac966 Remove expensive copies 2026-03-13 01:07:09 +00:00
Trevor Clinkenbeard 225524e93d Remove unnecessary dependency in fdbcli/CMakeLists.txt 2026-03-13 00:43:58 +00:00
Trevor Clinkenbeard 673dcfdbf0 Rename fdbcli.actor.h 2026-03-13 00:43:02 +00:00
Trevor Clinkenbeard 23885dbb7e Rename non-actor files in fdbcli 2026-03-13 00:23:11 +00:00
Trevor Clinkenbeard 20bd7d9884 Remove unnecessary braces 2026-03-13 00:10:42 +00:00
Trevor Clinkenbeard 0b8361c6bb More post coroutine conversion cleanup 2026-03-13 00:01:46 +00:00
Trevor Clinkenbeard e8a0c6acfb Remove unnecessary braces 2026-03-12 23:26:45 +00:00
Trevor Clinkenbeard 912830a024 Post coroutine conversion cleanup 2026-03-12 23:12:52 +00:00
Trevor Clinkenbeard 2bba52fb58 Initial coroutine conversion of many fdbcli files 2026-03-12 22:57:03 +00:00
Trevor Clinkenbeard 719b2377dd
Convert several `fdbcli` files to standard coroutines (#12760)
* Convert actors to standard coroutines in several fdbcli files

* Avoid expensive copy

* Fix LockCommand.actor.cpp build

* Fix build

* Post coroutine conversion cleanup
2026-03-10 12:36:44 -07:00