Commit Graph

1930 Commits

Author SHA1 Message Date
Trevor Clinkenbeard 78b502f6c9
Merge pull request #13771 from tclinkenbeard-oai/dev/tclinkenbeard/mark-missed-probes-rare-20260722
Align code probe rarity with simulation coverage
2026-07-29 12:14:50 -07:00
Trevor Clinkenbeard b770b7f00e Honor configured client metric sampling during simulation speed-up 2026-07-25 12:23:17 -07:00
Trevor Clinkenbeard a42a354b0d Adjust code probe rarity to match simulation coverage 2026-07-22 10:28:11 -07:00
Trevor Clinkenbeard 15df0ae8fc Remove unused FoundationDB helpers 2026-07-17 19:49:29 -07:00
Trevor Clinkenbeard 17c87353cd Simplify split point limit support 2026-07-13 17:18:29 -07:00
Trevor Clinkenbeard cb670943bf Address split point limit review follow-ups 2026-07-13 16:27:20 -07:00
Trevor Clinkenbeard cd2c16ff38 Bound split-point work across shards and bindings 2026-07-13 15:29:03 -07:00
Trevor Clinkenbeard a5924a7680 Bound split-point location lookups 2026-07-13 12:37:23 -07:00
Trevor Clinkenbeard 8f7a072a3d Add split point limit support 2026-07-13 11:01:33 -07:00
Michael Stack a0dac3a52a
Revert WaitStorageMetricsHandleError SevWarn upgrade (#13336)
PR #12913 upgraded WaitStorageMetricsHandleError from SevDebug to SevWarn
after 60s of retrying, intending to give operators visibility into stuck
shard metric loops. In production this fires ~10/sec/cluster, putting it
in the top 35 most frequent TraceEvents.

The 60s threshold doesn't filter for stuck shards. The SS-side
waitMetrics handler is a long-poll with STORAGE_METRIC_TIMEOUT = 600s
(fdbserver/storageserver/storageserver.actor.cpp:11476). On timeout, the
SS deliberately returns wrong_shard_server with probability
WAIT_METRICS_WRONG_SHARD_CHANCE = 0.1 to force clients to refresh their
location cache (fdbserver/core/StorageMetrics.cpp:742). So most calls
that ever reach this catch block already have Elapsed >= 600s by design,
and the SevWarn fires on normal quiet-cluster operation, not stuck
shards. DD-init stall visibility (the actual goal of PR #12913) is
covered by the DDInitServerListAndDataMoveReadComplete /
DDInitKeyServerScanComplete / DDInitSlowDataMoveRead events that PR also
added — those are at the right layer.

Revert this event to plain SevDebug and add a comment explaining why,
so a future reader doesn't reintroduce the upgrade.
2026-06-10 13:44:48 -07:00
Viraj Chogle 72fca11de1
Remove dead client-side storage cache code left behind by #12486 (#13326)
* Remove dead client-side storage cache code left behind by #12486

LocationInfo::hasCaches, addCaches(), updateLocationCacheWithCaches(),
DatabaseContext::{cacheListMonitor, updateCache}, and the dead hasCaches branch in loadBalance() - all unreachable since #12486.
Follow-up sweep in the same spirit as #13119.

* Inline trivial loadBalance wrapper into its callers

Addresses review feedback on #13326. With the hasCaches branch gone, the anonymous-namespace loadBalance(DatabaseContext*, Reference<LocationInfo>, ...) wrapper is a pure forwarder. Delete it and update its five callers to call loadBalance(alternatives->locations(), ...) directly. No behavior change.
2026-06-09 22:44:04 -07:00
Trevor Clinkenbeard b46c58415c Replace BUGGIFY macros with inline function 2026-05-20 14:54:51 -07:00
Rahul Kodali 3854c403a7
fix: prevent spurious commit_unknown_result_fatal from client buggify (#13140) 2026-05-13 11:23:32 -07:00
Pierre Zemb 5f665a199b
Populate committedVersion on automatic idempotency replay path (#13038)
* Detect missing commit version after automatic idempotency replay

Adds a post-commit assertion in AutomaticIdempotencyWorkload that every
successful transaction reports a non-invalid getCommittedVersion(). The
replay path in NativeAPI exercised by CLIENT_BUGGIFY currently leaves
trState->committedVersion unset, which this regression guard catches.

Related to #12582.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Populate committedVersion on automatic idempotency replay path

When a commit request returns commit_unknown_result for a transaction
carrying an idempotency id, determineCommitStatus reads the system
keyspace and may discover the original commit succeeded. In that case
we reconstruct the versionstamp from CommitResult but previously forgot
to record the commit version back on the TransactionState, so callers
observing getCommittedVersion() after success would see invalidVersion.

Mirror the normal-path assignment from line ~4456 on the replay branch.

Fixes #12582.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 21:01:09 -07:00
Trevor Clinkenbeard 42b1e5f943
Merge pull request #13187 from tclinkenbeard-oai/dev/tclinkenbeard/quota-throttling-followup
Deprecate quota throttling (part 2)
2026-05-11 09:11:42 -07:00
Trevor Clinkenbeard 287efc8530 Rename key-backed coroutine headers 2026-05-11 07:47:09 -07:00
Trevor Clinkenbeard 7301d4a0cd Remove proxy-side quota throttling compatibility path 2026-05-09 20:16:48 -07:00
Trevor Clinkenbeard 0343ab4cbe Address quota throttling review follow-ups 2026-05-09 19:52:46 -07:00
Trevor Clinkenbeard 4501e821b7
Merge pull request #13157 from tclinkenbeard-oai/dev/tclinkenbeard/structured-bindings-readability
Expand use of structured bindings in for loops
2026-05-07 12:55:52 -07:00
Rahul Kodali 4665c6e0f5
fix: use thread-local mt19937_64 for automatic idempotency ID (#13135)
* fix: use thread-local mt19937_64 for automatic idempotency ID

* feat: add platform::getRandomBytes and use it for idempotency IDs

* fix: pr fixes + getentropy support

* fix: pr review changes
2026-05-07 12:39:50 -07:00
Trevor Clinkenbeard 293a18a611 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/structured-bindings-readability 2026-05-07 09:04:38 -07:00
Trevor Clinkenbeard 408e4bdde0 Prefer range-for loops without index use 2026-05-05 16:34:27 -07:00
Trevor Clinkenbeard 4cd5c58d63 Use structured bindings in pair loops 2026-05-05 16:30:09 -07:00
Michael Stack 09d67f918e
Add DD init visibility, metrics retries, shard tracking, scan progress, and team collection logging (#12913) (#13142)
* Add DD init and team collection logging for diagnosing slow startups

When SHARD_ENCODE_LOCATION_METADATA=true we take new codepaths often
opaque. Add logging.

For example, DD init hung for 14-16 minutes with zero visibility into
what was stuck. The only clue was a gap between DDInitUpdatedReplicaKeys
and DDInitGotInitialDD trace events.  Diagnosing the root cause required
extensive log splunking of SS metrics to determine that a single
getRange(dataMoveKeys) read was queued on an overloaded storage server.

DDTxnProcessor.actor.cpp:
- Log elapsed time for the server list + data move read transaction
  (DDInitServerListAndDataMoveReadComplete) with NumDataMoves, NumServers
- Log elapsed time for the keyServer scan (DDInitKeyServerScanComplete)
  with NumShards
- Warn when getRange(dataMoveKeys) takes >5 seconds
  (DDInitSlowDataMoveRead)

DataDistribution.actor.cpp:
- Add NumShards and NumServers to DDInitGotInitialDD
- Promote DDInitFoundDataMove from SevDebug to SevInfo so individual
  data moves are visible in production logs
- Add DDInitResumedDataMoves summary event with ValidMoves,
  CancelledMoves, EmptyMoves counts and elapsed time

DDTeamCollection.actor.cpp:
- Add Reason and Address details to UndesiredStorageServer trace events
  to distinguish version lag, same-address, wrong-class, and exclusion
  causes without needing to correlate with other log lines

* Revert DDInitFoundDataMove to SevDebug to avoid log spam with many data moves

* Add DD startup visibility: metrics retries, shard tracking, scan progress

Additional logging to address DD operational opacity during startup,
based on past incidents where DD hung with no visibility into the cause.

NativeAPI.actor.cpp:
- Log WaitStorageMetricsRetrying every 60s when waitStorageMetrics is
  stuck retrying wrong_shard_server or all_alternatives_failed, with
  the key range, retry count, and elapsed time. Previously these retries
  were silent (SevDebug only), making it impossible to identify which
  shard was stuck or that retries were even happening.

DDShardTracker.actor.cpp:
- Log TrackInitialShardsComplete after shard tracker setup with count
- Log TrackInitialShardsMetricsComplete after changeSizes() finishes
  with elapsed time. changeSizes() waits for ALL shards to report
  metrics via getFirstSize/waitStorageMetrics -- if any shard metrics
  never arrive, this hangs silently.

DDTxnProcessor.actor.cpp:
- Log DDInitKeyServerScanProgress every 30s during the multi-transaction
  keyServer scan with current beginKey, batch count, shards scanned,
  and elapsed time. With 255K shards this scan requires many transactions
  and a stuck one was previously invisible.

DataDistribution.actor.cpp:
- Log DDInitComplete with elapsed time after DataDistributor::init()
  finishes, providing a single event showing total init duration.

- NativeAPI.actor.cpp: Move retry logging outside the error-type if block
  so all errors get keys/elapsed/retries details. Use severity upgrade
  (SevDebug -> SevWarn after 60s) on the existing WaitStorageMetricsHandleError
  event instead of a separate event name.
- DataDistribution.actor.cpp: Add periodic progress logging (every 30s) in
  resumeFromDataMoves loop so operators can watch counts go up during long
  data move recovery.
- CompileBoost.cmake: Remove BOOST_NO_CXX98_FUNCTION_BASE since 7.3 CI is
  broken independently of this change.

DD exits (e.g. movekeys_conflict) were invisible because
reportErrorsExcept suppresses logging for "normal" DD errors.
Add DDExiting trace event at SevWarn with error and code so
every DD death is visible in trace logs.
2026-05-05 14:17:09 -07:00
Trevor Clinkenbeard c2a84c2b7c
Merge pull request #13151 from tclinkenbeard-oai/dev/tclinkenbeard/try-commit-fix
Fix `tryCommit` handling of `never_reply` errors
2026-05-05 14:06:57 -07:00
Trevor Clinkenbeard 261ebe8a7c Fix tryCommit handling of never_reply 2026-05-04 21:15:03 -07:00
Trevor Clinkenbeard 242f30797f Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/fast-reject-grv 2026-04-28 15:10:06 -07:00
Trevor Clinkenbeard e1025a7993
Merge pull request #13080 from tclinkenbeard-oai/dev/tclinkenbeard/move-simulator-up
Move FDB-specific logic out of `ISimulator`
2026-04-28 16:52:22 -05:00
Trevor Clinkenbeard 10c495edf0
Merge pull request #13075 from tclinkenbeard-oai/dev/tclinkenbeard/grey-failure-detection
Improve header file encapsulation
2026-04-28 14:45:23 -05:00
Trevor Clinkenbeard 76e353a76a Merge remote-tracking branch 'apple/main' into dev/tclinkenbeard/fast-reject-grv 2026-04-26 20:42:07 +00:00
Trevor Clinkenbeard 7d1fbe0ab6 Remove ISimulator::TSSMode 2026-04-25 18:58:16 +00:00
Trevor Clinkenbeard c127105f57 Improve header file encapsulation 2026-04-24 16:03:07 +00:00
Trevor Clinkenbeard a61fe98cdc More post-coroutine-conversion linting 2026-04-21 21:08:48 -07:00
Trevor Clinkenbeard 9eecbd9699 Move getWorkerInterfaces declaration 2026-04-21 20:11:17 +00:00
Trevor Clinkenbeard 691e3d9c1f Preserve max GRV queueing threshold through client 2026-04-18 22:55:20 +00:00
Trevor Clinkenbeard 7cafcb7a55 Add comments 2026-04-18 22:35:01 +00:00
Trevor Clinkenbeard 050eed97c8 Add MAX_GRV_QUEUE_DELAY option 2026-04-18 22:18:54 +00:00
Trevor Clinkenbeard 6cd37904b0 Convert checkWrites to standard coroutines 2026-04-12 18:21:03 +00:00
Trevor Clinkenbeard 8bc44420fe Convert warmRange_impl to standard coroutine 2026-04-12 18:10:01 +00:00
Trevor Clinkenbeard 9d0e5b871e Convert checkSafeExclusions to standard coroutine 2026-04-12 17:13:07 +00:00
Trevor Clinkenbeard 06bb344de3 Convert getKey(Range)Location_internal actors to standard coroutines 2026-04-12 17:09:55 +00:00
Trevor Clinkenbeard 6e65c22a47 Convert storage wiggle actors to standard coroutines 2026-04-12 17:06:23 +00:00
Trevor Clinkenbeard 24e6f7501c Update getKeyRangeLocations_internal to use proxyLoadBalance 2026-04-12 16:58:33 +00:00
Trevor Clinkenbeard 324b2f96a6 Update getKeyLocation_internal to use commitProxyLoadBalance 2026-04-12 16:49:06 +00:00
Trevor Clinkenbeard 55a6d20c74 Convert non-performance-sensitive actors in fdbclient to standard coroutines 2026-04-11 20:40:10 +00:00
Trevor Clinkenbeard 0dc8ca55dd
Create `(grv|commit)ProxyLoadBalance` helper coroutines (#12918)
* Create proxyLoadBalance coroutine

* Update snapCreate to use proxyLoadBalance

* Remove unnecessary errorOr call

* Use proxyLoadBalance in waitDataDistributionMetricsList

* Convert 2 proxyLoadBalance users to standard coroutines

* Create grvProxyLoadBalance

* Rename proxyLoadBalance

* Use grvProxyLoadBalance in getHealthMetricsActor

* Add comments in ProxyLoadBalance.h

* Fix formatting
2026-04-10 14:10:17 -07:00
Trevor Clinkenbeard 9a39ca2728 Migrate client-side callers 2026-04-02 10:23:26 +00:00
Trevor Clinkenbeard 9ba44fd75b Rename *.actor.h files without ACTORs 2026-03-27 04:53:43 +00:00
Trevor Clinkenbeard 5cf4b48319 Rename ManagementAPI* files 2026-03-24 16:13:35 +00:00
Trevor Clinkenbeard 055d930896 Merge remote-tracking branch 'origin/main' into dev/tclinkenbeard/global-config-coro 2026-03-22 13:01:27 -07:00