Commit Graph

30 Commits

Author SHA1 Message Date
Trevor Clinkenbeard 6fc44a884e Use explicit non-coroutine management callbacks 2026-07-22 10:56:24 -07:00
Trevor Clinkenbeard 44ec67153b Fix management helper thread-future lifetime 2026-07-22 10:08:12 -07:00
Trevor Clinkenbeard a9ec6195d8 Reuse RYW transaction retries for exclusion management 2026-07-22 10:01:50 -07:00
Trevor Clinkenbeard b7950d9e52 Share exclusion special-key ranges and range readers 2026-07-22 09:59:23 -07:00
Trevor Clinkenbeard 648f42563a Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/move-process-class
# Conflicts:
#	fdbrpc/include/fdbrpc/Locality.h
#	fdbserver/clustercontroller/ClusterController.h
#	fdbserver/core/LeaderElection.cpp
2026-07-08 09:39:05 -07:00
Trevor Clinkenbeard 0d58632bcc Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/split-management-api-status-rangelock
# Conflicts:
#	fdbclient/ManagementAPI.cpp
2026-07-07 16:45:03 -07:00
Akanksha Mahajan f6a0557f3a
Rename Range Partitioned to consisent name (#13386) 2026-07-03 11:02:24 -07:00
Trevor Clinkenbeard 41fedfcc03 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/move-process-class
# Conflicts:
#	fdbrpc/Locality.cpp
2026-06-25 18:03:02 -07:00
Trevor Clinkenbeard 24c9a91108 Move simulator process helpers into fdbserver core 2026-06-25 02:10:10 -07:00
Trevor Clinkenbeard cc142778ba Move process class types into fdbclient 2026-06-25 00:42:31 -07:00
Trevor Clinkenbeard fe42e6fd79 Enforce clang-tidy braces around long statements 2026-06-22 23:01:11 -07:00
Trevor Clinkenbeard 8d18f51d23 Split StatusSchema and RangeLock from ManagementAPI 2026-06-22 20:45:02 -07:00
Michael Stack 9b5dda16ce
backup/restore: operator UX cleanups for CLI flags and status output (#13345)
Four small, independent changes surfaced while running a manual
backup/restore demo end to end:

- fdbrestore now accepts -C and --cluster-file as aliases for
  --dest-cluster-file. Every other tool (fdbcli, fdbbackup, fdbserver,
  backup_agent) already pairs -C with --cluster-file; fdbrestore was
  the lone outlier and forced scripts to special-case it.

- fdbcli now accepts --logdir as an alias for --log-dir. Every other
  tool spells the flag --logdir (no hyphen); the --log-dir form in
  fdbcli was the outlier here.

- fdbbackup status no longer prints "BulkLoad Compatible: no" when
  Snapshot Mode is rangefile. In that mode the answer is tautologically
  derivable from the line above it (no bulkdump task ever runs), so
  the line carries no information. The field still prints in modes
  bulkdump and both, where it can flip during an in-progress backup.

- Correct the misleading comment in FileBackupAgent.cpp that claimed
  submitBulkLoadJob validates cluster preconditions server-side. It
  does not. A bulkload restore against a cluster missing
  shard_encode_location_metadata / enable_read_lock_on_range, or with
  a storage engine that cannot ingest SSTs, succeeds at submission and
  then silently stalls in "State: running, Tasks: 0/0" forever. Replace
  the comment with a faithful description of the failure mode and add
  a matching TODO in submitBulkLoadJob explaining where the real
  validation needs to live (somewhere with cluster-side knob
  visibility) and why it cannot be done from fdbclient.
2026-06-12 07:54:47 -07:00
Trevor Clinkenbeard b46c58415c Replace BUGGIFY macros with inline function 2026-05-20 14:54:51 -07:00
neethuhaneesha 2633ed5793
Adding range_backup_worker_enabled to DB config for recruiting range partitioned backup workers. (#13169) 2026-05-11 08:32:09 -07:00
Trevor Clinkenbeard 73a5716c90 Apply clang-format to makeReference cleanup 2026-05-09 13:24:59 -07:00
Trevor Clinkenbeard d7f1bdc66f Prefer makeReference for polymorphic references 2026-05-09 13:13:05 -07:00
Trevor Clinkenbeard 8b3d03c8bf Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/move-simulator-up 2026-04-25 00:14:13 +00:00
Trevor Clinkenbeard 2709c95f7b Create ISimulationPolicy interface 2026-04-24 20:51:23 +00: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 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 38b05e51cd Post coroutine conversion linting 2026-03-25 16:31:16 -07:00
Trevor Clinkenbeard 19f904324d Fix invalid Optional access 2026-03-25 13:10:05 -07:00
Trevor Clinkenbeard 3ac10dd351 Fix invalid err access 2026-03-25 19:19:08 +00:00
Trevor Clinkenbeard a46589120a Fix build 2026-03-24 16:42:04 +00:00
Trevor Clinkenbeard f29604e814 Fix unit test 2026-03-24 16:34:45 +00:00
Trevor Clinkenbeard 755fb2de59 Remove unnecessary braces 2026-03-24 16:21:23 +00:00
Trevor Clinkenbeard 5cf4b48319 Rename ManagementAPI* files 2026-03-24 16:13:35 +00:00