Commit Graph

347 Commits

Author SHA1 Message Date
Jingyu Zhou a1289b3480
Optimize keyInfo lookup in commit proxy [release-7.4] (#12106)
* Optimize keyInfo lookup in commit proxy

Replacing expensive two RangeMap lookups with one.

20250424-232218-jzhou-babebfe4fe6201e0

* Remove dead code
2025-04-27 10:53:40 -07:00
Dan Lambright 432374a4df
Disable version vector unicast with idempotent transactions (#12039)
* Disable version vector unicast with idempotent transactions

* Respond to review requests

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-21 15:30:06 -07:00
Syed Paymaan Raza bc8eca15e1
Initialize lastShardMove for recovery txn and in CommitBatchContext (#12027) 2025-03-13 15:25:46 -07:00
Dan Lambright 8c6f8c1403
Track shard moves for version vector (#11977)
* Track shard moves for version vector

* Don't broadcast to all TL when a different CP had a metadata mutation, unless on shard moves

* update lastShardMove on resolver

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-11 13:19:57 -04:00
Jingyu Zhou 082cded30a Set max_read_transaction_life_versions for KillRegionCycle.toml
Simulation found an assertion failure in SS:
	ASSERT(rollbackVersion >= data->storageVersion());

The reason is that storage version is updated to a version larger than the
forced recovery version, due to only 1'000'000 for max_read_transaction_life_versions.
Also added debugging for cumulative checksum mutations.

See rdar://144550725

20250309-185039-jzhou-5145c65b0e8071b7
2025-03-09 11:37:46 -07:00
Dan Lambright 8bba38b180
Version vector: compute locations only once during commits. (#11924)
* During commits with version vector enabled, compute location list only once, as recalcuating could
generate a different random number, hence a different set of locations.

* Respond to review comments.

* Select replicas from locations returned from resolver.

* Respond to review comments

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2025-03-04 17:09:06 -05:00
Jingyu Zhou 8cd90ee7d0 Holds onto temporary variables' memories
Otherwise, StringRef points to free'ed memory locations.
2025-02-10 14:45:24 -08:00
hao fu 93133c83fb address comments 2025-01-23 12:32:27 -08:00
hao fu 933b035729 Refactor backup mutation serialization 2025-01-23 08:52:18 -08:00
flowguru fe47ce24d3
New restore consolidated commit (#11901)
* New restore consolidated commit

This change adds RestoreDispatchPartitionedTaskFunc to restore
from partitioned-format backup.

* ArenaBlock::totalSize parameter pass by ref

* Fix format issues identified by CI
2025-01-22 14:54:55 -08:00
Sreenath Bodagala 265b4bc7b5 - When version vector is enabled, make proxies advance min committed
version only after receiving a commit version reply from the sequencer.
Advancing the min committed version prior to that point may result in
invalid DBRecoveryDurability errors (if a recovery happens after the
advancement) in simulation tests.
2024-12-06 00:20:33 +00:00
Zhe Wang 0cf708b174
Fix accumulative checksum (#11751)
* fix accumulative checksum

* ss does not persist acs value per epoch

* nits
2024-11-04 13:15:26 -08:00
Zhe Wang 22249b46d3
make range lock compatibility clear (#11748) 2024-11-01 09:48:25 -07:00
Dan Lambright 317956ee14
disable version vector with range lock tests (#11746)
* disable version vector with range lock tests

* turn off rangeLock if versionvector is on (#11747)

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
Co-authored-by: Zhe Wang <zhe.wang@wustl.edu>
2024-10-31 21:07:01 -04: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
Dan Lambright a87e940e05
fix bug TxnStateStoreCycleTest for version vector (#11723)
* fix bug TxnStateStoreCycleTest for version vector

* Respond to review comment

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-10-23 15:53:15 -04:00
Syed Paymaan Raza c146ee0869
[fdbserver] Use STL contains method and std::find for containment checks (#11702) 2024-10-15 11:40:02 -07:00
Jingyu Zhou fc30fc269e Remove dead code after removing tagLocalityUpgraded usage
20240918-170752-jzhou-33111b2c3e6776aa
2024-09-18 11:23:09 -07:00
Jingyu Zhou 7b76561bb9 Remove tagLocalityUpgraded usage at various places
Since we have removed old tlog implementation, so the code path using this tag
can be deleted to simplify the code.
2024-09-18 11:23:09 -07:00
Dan Lambright fff5d73125
Fix bug in PR 11628, which did not account for pseudo tags (#11643)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-10 15:31:32 -04:00
Dan Lambright 5eafd46351
Disable version vector on batches with backed up mutations (#11634)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-09 21:18:59 -04:00
Dan Lambright 85ef093d71
Choose log router tag prior to resolution in commit path for version vector. (#11628)
Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-09-06 11:20:30 -04:00
Syed Paymaan Raza 48064f6cf1
Make some codeprobes rare (#11607)
* Make BlobGranule code probes rare

* Make encryption related code probes rare

* fixup! Fix formatting
2024-08-26 22:33:38 -07:00
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Xiaoge Su b324bfb9b9
When a commit is cancelled, record all unresponsive/failed TLogs (#11459)
* When a commit is cancelled, record all unresponsive/failed TLogs

* fixup!

* fixup!

* fixup!
2024-07-23 17:26:11 -07:00
Jingyu Zhou a733e48048
Merge pull request #11517 from jzhou77/release-notes
Fix Wunused-but-set-variable warnings
2024-07-18 13:51:21 -07:00
Sreenath Bodagala aacf2e29db
Compute known committed version correctly when version vector unicast is enabled (#11511)
* - Compute known committed version correctly when version vector unicast
is enabled.

* - Set ProxyCommitData::minKnownCommittedVersion only if the commit
version is above ProxyCommitData::committedVersion.
2024-07-18 14:41:40 -04:00
Jingyu Zhou 3a3ee247ab Fix Wunused-but-set-variable warnings 2024-07-17 13:09:32 -07:00
Xiaoge Su cf70d45e6d Add PeerAddress to all PeerAddr/Peer TraceEvent
This is to address #4846
2024-07-09 16:49:22 -07:00
Zhe Wang 314f4c41c7
Fix ACS mutation bug and improve accumulative checksum (#11319)
* enable acs by default

* code clean

* improve ACS code

* nits

* nits

* fix data corruption issue triggered by acs mutation
2024-04-20 01:31:55 -07:00
Jingyu Zhou e0674ced7c Increase CommitProxyTerminated severity for failed_to_progress errors.
For better visibility.
2024-04-17 14:49:48 -07:00
Zhe Wang 33eecd0775
Real-time corruption detection with accumulative checksum (#11255)
* acs framework

* code refactor and fix bugs

* add ss crash loop protector

* use sharedptr instead of raw pointer

* fixed critical bugs and add provate mutation acs to the framework

* enable ACS for all mutations except for clear serverTag mutation and fix bugs

* fix restarting tests

* refactor code and fix bugs

* fix AccumulativeChecksumState toString

* fix bugs

* allow all mutations in acs and fixed bugs

* fix bugs and code cleanup

* code clean up for adding recovery support

* simplify code and support recovery

* clear acs state at ss

* fix bug

* terminate validator if ss will be removed in the current batch

* simplify code

* add trace

* address comments

* optimize code

* deep copy when adding mutation to acs validator

* warp encode and decode persist acs key

* make acstable private

* remove unless func

* remove unless func

* remove epoch in ACS validator

* add acs mutation counter in SS metrics

* code cleanup and make knob check better

* make mutation buffer global

* simplify code

* add comments

* make knob randomly set

* address comments

* ss reboot after acs mismatch found
2024-04-04 15:03:44 -07:00
Dan Lambright f3b2bca2c2
Fix detection of private mutations in version vector (#11268)
* Fix detection of private mutations in version vector

* add assertion that all tlogs receive changes to txn state in version vector

* Re-suppress version_vector upgrade tests

---------

Co-authored-by: Dan Lambright <hlambright@apple.com>
2024-04-01 15:20:32 -04:00
Dan Lambright 50f8eabfa3
Remove assertion equality in tcpvmap size on resolver return. (#11262) 2024-03-21 13:42:04 -04:00
Zhe Wang b10c7107bb
Enable Accumulative Checksum in MutationRef (#11225)
* code clean up and add accumulative checksum bits to mutation ref

* address comments and fix issues

* address comments

* propagate acs index from commit proxy to storage server

* address comments

* address comments

* address comments

* address comments
2024-03-11 09:51:31 -07:00
He Liu 9d8d52cbb7
Added checksum in MutationRef (#11181)
* Append checksum to param2.

* Pass sim tests w/o validating checksums.

* Code cleanup.

* Renew checksum.

* Remove checksum for all private mutations.

* Added checksum validation at SS.

* Fixed VERSION_TIMESTAMP.

* Disable Mutation Checksum by default.

* Cleanup.

* cleanup.
2024-02-09 13:36:41 -08:00
Dimitris Apostolou a88114c222
Fix typos 2024-02-07 01:16:00 +02:00
Dan Lambright 015167c17e
Throttle commits against hot shards (#10970)
* throttle hot shards

* expire throttled shards over time

* add backoff

* Parallelize messaging from RK to CP

* Obtain shards from a single SS

* handle expired transactions

* bump transaction_throttled_hot_shard

* Change SevError to SevWarn for CannotMonitorHotShardForSS

* Add log per request
2023-10-31 12:01:34 -04:00
sfc-gh-tclinkenbeard dccc0e6773 Merge remote-tracking branch 'origin/main' into main-fix-clear-cost-estimation 2023-09-04 13:30:46 -07:00
Yi Wu 3287098b4a EaR: Handle KMS timeout in storage server and commit proxy 2023-08-28 16:17:43 -07:00
sfc-gh-tclinkenbeard d6a7e1eccd Normalize clear costs for quota throttler 2023-08-22 15:29:28 -07:00
Nim Wijetunga 7f2260bbd2
Add Encryption Related Latency Metrics (#10596)
* add ss and cp latency metrics

* make changes
2023-07-14 11:30:16 -07:00
Ata E Husain Bohra 7779c908b3
EaR: Remove usage of ENABLE_CONFIGURABLE_ENCRYPTION knob (#10570)
Description

Given Configurable encryption has been checked in and being tested via
simulation for more than a month and also to avoid penalty of accessing
KNOBS in inline commit path, patch retires the KNOB and make
ConfigurationEncryption default EaR mode for FDB.

BlobCipher still supports the old format header and encryption semantics,
will remove the dead code as a followup PR.

Testing

devRunCorrectness - 100K
2023-06-30 17:48:09 -07:00
Evan Tschannen ef682d304e fix IKeyValueStore include 2023-06-16 13:28:40 -07:00
Evan Tschannen 359e178dcd Merge branch 'main' into feature-durable-change-feed
# Conflicts:
#	fdbclient/ClientKnobs.cpp
#	fdbserver/BlobManager.actor.cpp
#	fdbserver/worker.actor.cpp
2023-06-11 13:58:35 -07:00
Jingyu Zhou f210cf708d
Merge pull request #10436 from jzhou77/main
Add getlocation and getall fdbcli debug commands
2023-06-08 22:05:03 -07:00
Jingyu Zhou 66b0699774 Fix IDE build 2023-06-08 16:59:17 -07:00
Dan Adkins da54faed5b
Replace calls to now() with timer_monotonic() when measuring durations. (#10308)
now() is only updated in the run loop, so timer() is more appropriate
for accurate measurements of latency. This change is limited to the
commit proxy server, where we observed inaccurate latency statistics.
2023-06-07 22:09:23 -04:00
Jingyu Zhou 1a8f3445ff Remove unused state variables 2023-05-18 12:23:22 -07:00
A.J. Beamon d8141c049d Add code probes for tenant code 2023-05-10 20:44:39 -07:00