Commit Graph

199 Commits

Author SHA1 Message Date
gxglass beca024943
Forward port PR #13068 to release-7.4 (async status related) (#13099)
It might have been easier to backport PR #12940 from main directly to release-7.4.

* Backport PR #12940 to release-7.3 (async status related) (#13068)

* Make status async and return before we timeout (#12940)

* Fix clusterGetStatus declaration for both actor compiler and clang-ide builds

The actor compiler adds const& to ACTOR params, so the source must use
value params. Clang-ide compiles .actor.cpp directly without the actor
compiler, so it needs a matching value-param declaration. Use
NO_INTELLISENSE guard to provide both.

* formatting

* Fix some misc backporting related issues

* Fix build for async status backport: remove tenant stuff, grey failure stuff, and update includes

* formatting

* remove dead code found in subsequent review

---------

Co-authored-by: Han Xu <hgcrpd@gmail.com>

* fix merge damage

* fix some more merge damage

* formatting

---------

Co-authored-by: Han Xu <hgcrpd@gmail.com>
2026-04-29 13:56:30 -07:00
Akanksha Mahajan ae4387350d Backup encryption fix on S3 (#12289)
* Backup encryption fix

* Add enable_read_cache option to be selected randomly to cover both code paths.

* Add randomization in ClientKnobs for testing
2025-09-24 11:25:51 -07:00
neethuhaneesha 3097543fa0
Prevent double-encoding of URIs in requests to S3BlobStore (#12302) 2025-08-18 09:53:10 -07:00
Zhe Wang f60e95c50b
[Release-7.4] Cherry-pick Avoid Source Storage Server Being Overloaded by Data Movements with Replica Consistency Check (#12176)
* Avoid Source Storage Server Being Overloaded by Data Movements with Replica Consistency Check (#12164)

* add ss metrics for fetch key

* bug fix

* revert checkTimeSpanSec

* fix adjustRelocationParallelismForSrc

* code cleanup

* fix replicaComparison

* remove unnecessary counters

* fix large storage server data structure

* address comments

* address comments

* address comments

* code cleanup

* bug fix

* fix bug

* remove taskID in get range requests
2025-06-02 12:34:34 -07:00
Zhe Wang a9cc2dd7dc
Cherrypick recent bulkload changes (#12135)
* Add multipart retry delay configuration. (#12076)

Add documentation to .h file.

Co-authored-by: stack <stack@duboce.com>

* Add a quickstart section on the bulkdump/bulkload feature to the user doc. (#12090)

* Fix assertion failure in fdbcli (#12095)

* Add Option to Turn Off Failure Injection to BulkLoad Process (#12096)

* add option to turn off failure injection to bulkload process in simulation

* nit

* DD BulkLoadTask Load Balance (#12103)

* bulkload load balance

* improve bulkload task submission efficiency

* address comments

* address comments

* cleanup

* Take a --proxy argument as backup_agent does. (#12110)

* Add "--proxy" to fdbserver (#12109)

* add --proxy to fdbserver

* fmt

* address comments

* use g_network to store proxy for s3client_ci

* Add 'ls' to s3client for the case where 'aws s3' is not installable (#12118)

* Add 'ls' to s3client for the case where 'aws s3' is not installable
-- i.e. production -- and we want a tool to test s3 connectivity.

Use it like this:

~/build_output/bin/s3client \
  --tls-ca-file /etc/ssl/cert.pem \
  --blob-credentials /path/to/credentials.json \
  ls "blobstore://backup-us-west-2.s3.amazonaws.com/x?bucket=backup-us-west-2&region=us-west-2"

* fdbclient/S3BlobStore.actor.cpp
* fdbclient/include/fdbclient/S3BlobStore.h
 Make constructResourcePath method on endpoint so accessible making ls
 URLs. Handling for encoded ampersands too. Allow 404 when requesting
 resource that doesn't exist.

* fdbclient/S3Client.actor.cpp
* fdbclient/S3Client_cli.actor.cpp
 Add in ls implementation.

* fdbclient/tests/s3client_test.sh
 Add test for new ls facility.

* See if this fixes compile issue

---------

Co-authored-by: michael stack <stack@duboce.com>

* Ingest sst files rather than their keyvalue content (2nd attempt) (#12108)

* Ingest sst files rather than their keyvalue content.

* fdbclient/ServerKnobs.cpp
* fdbclient/include/fdbclient/ServerKnobs.h
 Add BULK_LOAD_USE_SST_INGEST knob.

* fdbclient/include/fdbclient/IKeyValueStore.actor.h
 Add ingestSSTFiles and supportSStIngestion.

* fdbserver/KeyValueStoreRocksDB.actor.cpp
* fdbserver/KeyValueStoreShardedRocksDB.actor.cpp
 Implement ingestSSTFiles and supportSStIngestion

* fdbserver/storageserver.actor.cpp
 If BULK_LOAD_USE_SST_INGEST and BulkLoadType::SST, ingest sst file
 rather than read keyvalues.

* fdbclient/tests/fdb_cluster_fixture.sh
 Use rocksdb instead of sqllite in tests.

* Revert "Ingest sst files rather than their keyvalue content."

This reverts commit 6d50bf15d3566de17fa6febf2afba0f220846ca6.

* ctests pass

* Restore ingest minus metric

* Add back ingestDuration metric

* Formatting

---------

Co-authored-by: michael stack <stack@duboce.com>

* Allow resource to be empty (#12129)

* RocksDB Do Compact After BulkLoad (#12130)

* rocksdb bulkload compact after load

* address comments

* address comments

* job overwrite task root path (#12138)

* 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

* avoid busy loop (#12157)

* First set of fixes... sizes and implement deleteResource (#12156)

Co-authored-by: michael stack <stack@duboce.com>

---------

Co-authored-by: Michael Stack <saintstack@users.noreply.github.com>
Co-authored-by: stack <stack@duboce.com>
2025-05-19 14:42:22 -07:00
Syed Paymaan Raza f002bbbd75
Disable ENABLE_REPLICA_CONSISTENCY_CHECK_ON_BACKUP_READS by default (#12133) 2025-05-06 12:16:44 -07:00
Zhe Wang c8f9066e3f
disable mutation checksum and accumulative checksum by default and add trace for audit storage (#12042) 2025-03-19 13:15:22 -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 8142ebd029
Add BulkLoad History (#11992)
* add bulkload history

* address comments

* address comments
2025-03-04 18:50:08 -08:00
neethuhaneesha 5872ef711b
Temporarily disabling backup dry run request until the issue is fixed (#11991) 2025-03-03 15:52:30 -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
michael stack 4d835c542c Have ctests use s3 if it is available.
Fix object integrity check; original approach doesn't work when
serverside encryption is enabled (awz:kms).

* contrib/SimpleOpt/include/SimpleOpt/SimpleOpt.h
 Address sanitizer was complaining about how SimpleOpt manipulates the
 array of options. While memcpy inside a buffer is 'odd', it seems fine.
 Its old code. Leaving it.

* fdbbackup/tests/s3_backup_test.sh
 Pass in weed_dir rather than rely on fixture global (the latter didn't
 work).

* fdbclient/ClientKnobs.cpp
* fdbclient/include/fdbclient/ClientKnobs.h
* fdbclient/include/fdbclient/S3BlobStore.h
 Add a knob to ask for object integrity check on download from s3.
 BLOBSTORE_ENABLE_OBJECT_INTEGRITY_CHECK replaces BLOBSTORE_ENABLE_ETAG_ON_GET
 which doesn't work when serverside encodes content (found in testing).

* fdbclient/S3BlobStore.actor.cpp
 Implement object integrity check on download. If
 enable_object_integrity_check is set, we use sha256 in place of md5
 as our hash. Removed a redundant 'verify' of md5 check.

* fdbclient/S3Client.actor.cpp
 Remove unhelpful comments.

* fdbclient/S3Client_cli.actor.cpp
 Add support for enable_object_integrity_check. This knob replaces
 enable_etag_on_get which didn't work when awz:kms serverside
 encryption was enabled.
 Add error code on exit when exception.

* fdbclient/include/fdbclient/S3Client.actor.h
 Move an include (address a review comment from previous commit).

* fdbclient/tests/aws_fixture.sh
 Add an aws fixture of utility that can be shared.

* fdbclient/tests/bulkload_test.sh
 Use imported log_test_result

* fdbclient/tests/s3client_test.sh
 Add using s3 if available; otherwise, do seaweedfs.

* fdbclient/tests/seaweedfs_fixture.sh
 WEED_DIR global doesn't work so have caller pass it in for each method
 instead.
2025-01-14 13:13:15 -08:00
michael stack 4c1e74105e Add checksum checking of downloads. Add cleanup of test data.
* fdbclient/ClientKnobs.cpp
* fdbclient/include/fdbclient/ClientKnobs.h
 Add knob BLOBSTORE_ENABLE_ETAG_ON_GET

* fdbclient/S3BlobStore.actor.cpp
 Optionally check etag (md5) volunteered by s3 against the
 content we have downloaded and fail if not equal (TODO:
 check the checksum after we've saved the content to the
 filesystem --  would require  good bit of a refactoring).

* fdbclient/S3Client.actor.cpp
 Add deleteResource support.

* fdbclient/S3Client_cli.actor.cpp
 Add COMMAND support; currently either 'cp' or 'rm'.
 Set the knob blobstore_enable_etag_on_get to true by
 default for s3client.

* fdbclient/tests/s3client_test.sh
 Add clean up of resources written up to s3 at end of test.
 (Awkward in bash)
2025-01-06 13:50:19 -08:00
flowguru ec2dde29fc
Fix backup dryrun bug (#11787)
* Fix backup dryrun bug

Currently there is a out-of-scope issue, this change also adds
a knob to control whether to allow dryrun of backup

* fix another bug that misses a wait statement

---------

Co-authored-by: Hao <fdbflowguru@gmail.com>
2024-11-15 11:56:03 -08: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
Syed Paymaan Raza c3e7542cda Update end year in copyright header 2024-08-02 09:40:11 -07:00
Jingyu Zhou a342aa704d
Merge pull request #11348 from sbodagala/main
Handle errors thrown by the load balancer replica consistency check framework
2024-05-02 11:50:23 -07:00
Sreenath Bodagala df2b7b4fe8 - Address PR review comments 2024-05-01 19:41:00 +00:00
Zhe Wang bf53218556
Improve distributed consistency checker (#11346)
* ConsistencyCheckerUrgent repeated run

* address comments

* avoid trace SevError for TesterRecruitmentTimeout unless it keeps failure for over 1 day

* address comments

* address comments
2024-04-30 14:45:32 -07:00
Sreenath Bodagala d6f6b45125 - Handle errors thrown during replica consistency check 2024-04-30 21:37:50 +00: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
Zhe Wang 832972e2da
Validate Mutation Version in Accumulative Checksum Framework (#11293)
* validate-mutation-version-in-acs-framework

* turn off knob

* randomly enable feature
2024-04-12 10:15:46 -07:00
Sreenath Bodagala a4430b9169
Compare storage replicas on reads (#11235)
* - Compare storage replicas on reads (in "loadBalance()")

* - Do consistency check on reads in loadbalance

* - Do replica consistency check in the case where loadBalance issues
requests to multiple storage servers

* - Address a state variable related bug

* - Code formatting

* - API simplification

* - Simplify code

* - Code formatting

* - Address a review comment
2024-04-11 16:08:54 -04: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
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
Zhe Wang 308ff77e91
Consistency Check Urgent (Cherrypick from Release-7.1) (#11217)
* cherry-pick-distributed-consistency-checker

* code cleanup

* refactor code, decouple consistencyCheckerUrgent and consistency checker

* fix workload for consistencycheckurgent

* add new consistencycheckurgent role type

* fix CI

* address comments
2024-02-28 14:22:47 -08: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
hao fu 3967136eeb Add Knobs to control retry delays for BlobStore
We learnt that a new connection needs to be made for each HTTP
request through proxy to AWS S3, thus it would fail when try
to re-use the connections and see retryable errors.

Meanwhile, delay between each retry grow 2x each time it failed,
if the connection pool has a larger size, the delay can be long.

As a result, this change adds Knobs to cap the max delay of
retryable errors, including one for general retryable errors,
and the other only for connection failure error.

This change also adds more logging for debugging.
2023-10-23 16:39:34 -07:00
Zhe Wu aea57f6da4 Create MAX_WRITE_TRANSACTION_LIFE_VERSIONS client knob 2023-09-14 14:01:43 -07:00
Yi Wu 3287098b4a EaR: Handle KMS timeout in storage server and commit proxy 2023-08-28 16:17:43 -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
Jefferson Zhong 13853c9f89 Move stepSize knob from ClientKnobs to ServerKnobs 2023-06-16 14:48:11 -07:00
Evan Tschannen 88eed268c3 added a knob for how many bytes are read from disk 2023-06-11 16:10:20 -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
Evan Tschannen f69f4c73ad addressed review comments 2023-06-11 13:54:38 -07:00
sfc-gh-tclinkenbeard 71846070d6 Update default tag throttling knob values 2023-05-25 16:45:32 -07:00
Josh Slocum 8f241632af adding knob to allow relative paths for local backup containers 2023-05-23 17:06:49 -05:00
Josh Slocum d038154d69
re-enabling change feed coalesce knob (#10317) 2023-05-23 14:43:11 -05:00
Josh Slocum 629b068145
Bg tenant metadata restarting (#10235)
* making blob metadata optionally deterministic across runs

* Non restarting test passes after refactor

* adding downgrade version test

* formatting
2023-05-23 11:24:13 -05:00
Hui Liu 7ca13d8f9c
support blob restore in fdbrestore (#10248) 2023-05-19 14:45:14 -07:00
Jefferson Zhong 3760522dc2 Make stepSize configurable for preloadApplyMutationsKeyVersionMap 2023-05-19 10:57:30 -07:00
Ata E Husain Bohra 18fd2702c4
EaR: Implement SimKmsVault interface, refactor SimKmsConnector (#10194)
Description

Patch implements a SimKmsVault interface allowing unittest/simulation
to satisfy encryption lookup usecases. It also refactors existing
SimKmsConnector to leverage SimKmsVault APIs

Testing

devRunCorrectness - 100K
/simKmsVault - asan & valgrind
EncryptionUnitTest
2023-05-10 12:44:53 -07:00
Jingyu Zhou 78434517ff Increase buggified STORAGE_METRICS_SHARD_LIMIT value
The previous buggified value 3 can be the same as key location size, thus
causing splitStorageMetrics() to stuck.
2023-05-04 19:31:43 -07:00
Josh Slocum 5b47913882
disabling global conncetion pool for now (#10054) 2023-04-28 09:48:56 -05:00
Hui Liu 711e040627
RestoreConfig - use restoreRangeSet to replace restoreRanges (#9912) 2023-04-06 11:16:05 -07:00
Josh Slocum a5b4212990 adding blob granule logical size 2023-03-15 08:54:49 -05:00
Nim Wijetunga 218ed4519f
Strengthen Snapshot Backup/Restore Asserts (#9552)
strengthen backup/restore asserts for encryption
2023-03-08 15:24:02 -08:00
Ata E Husain Bohra d0eec9d0ba
EaR: REST KMS fixes - encryption integration testing (#9598)
* EaR: REST KMS fixes - encryption integration testing

Description

Major changes:
1. Multiple fixes observed while performing integration end-to-end
testing for Encryption at-rest feature.
2. Improve REST module logging. Introduced FLOW_KNOBS->REST_LOG_LEVEL
to have more granular control of feature logging disconnected from
the cluster log level.

Testing

Integration testbed:
1. Run fdbserver standalone
2. Run external KMS http-server to serve encryption key fetch requests
2023-03-08 09:49:43 -08:00
Ata E Husain Bohra a45de70003
EaR: RESTClient HTTP compliance, fix json request content type (#9544)
* EaR: RESTClient HTTP compliance, fix json request content type

Description

  diff-1: Address review comments

RESTClient is responsible to handle FDB <-> KMS communication
for Encryption and other usecases. By design, it only supports
"secure connection" i.e. "https"; however, it seems there is a
need to expand the module to support "http" connection,
for instance: test and dev deployments for instance.

However, given RESTClient gets involved in handling high
sensitive contents such as: plaintext "encryption cipher
from a KMS", the feature is guarded using
CLIENT_KNOB->REST_KMS_ENABLE_NOT_SECURE_CONNECTION which is
settable using FDBServer command line argument
"--kms-rest-enable_not_secure_connection" (boolean)

Testing

Deployed a standalone fdbserver and communicate with a
simple "http" server
2023-03-06 16:06:03 -08:00