Commit Graph

628 Commits

Author SHA1 Message Date
Zhe Wu fffdfa5b3d Increase MAX_STORAGE_COMMIT_TIME to be inline with LOW_PRIORITY_DURABILITY_LAG 2023-05-02 11:12:52 -07:00
Zhe Wang d6e7b5f736
Audit storage: validate consistency of replica and shard location metadata (#9628)
* Implemented AuditUtils.actor.cpp

Moved AuditUtils to fdbserver/

* Persist AuditStorageState.

* Passed persisted AuditStorageState test.

* Added audit_storage_error to indicate a corruption is caught.

Throw/Send audit_storage_error when there is a data corruption.

Added doAuditStorage() for resuming Audit.

* Load and resume AuditStorage when DD restarts.

* Generate audit id monotonically.

* Fixed minor issue AuditId/Type was not set.

* Adding getLatestAuditStates.

* Improved persisted errors and added AuditStorageCommand.actor.cpp for
fdbcli.

* Added `audit_storage` fdbcli command.

* fmt.

* Fixed null shared_ptr issue.

* Improve audit data.

* Change DDAuditFailed to SevWarn.

* Sev.

* set SERVE_AUDIT_STORAGE_PARALLELISM to 1.

* Moved AuditUtils* to fdbclient/.

* Added getAuditStatus fdbcli command.

* Refactor audit storage fdb cli commands.

* Added auditStorage in sim.

* Cleanup.

* Resolved comments.

* Resolved comments.

* Added SystemData for metadata audit.

Refactored audit workflow to make sure all sub-tasks are executed w/o
early exit.

* Improvements.

* Persisted Failed state after too many retries.

* Added retryCount for resumeAuditStorage().

* resolving conflict.

* Resolved conflicts.

* allow-merged-to-run

* add timeout to audit client

* fmt

* validate replica

* add audit serverKey

* address comments and fmt

* fix audit_storage_exceeded_request_limit

* fix segfault in getLatestAuditStatesImpl

* fix bugs

* remove timeout from workload

* fix bugs

* audit local view of shard assignment

* fmt

* fix-stuck-issue-and-make-dd-audit-storage-self-retry

* fix timeout

* fix timeout

* fix bugs and cleanup

* fix nit

* change name state to coreState for audit metadata

* address comments

* code clean

* fmt

* setup debug

* cleanup

* clean up

* code cleanup

* code clean

* remove tmp file

* fmt

* trace portion of shards that of anonymous physical shard

* remove unnecessary actor cleanup

* do not give up when tr is too old

* address commits

* refactor

* clean

* fmt

* fix-command-help-text

* fix-auditstate-restore-and-enable-restore-to-metadata-audit

* address comments

* fmrt

* debug and improve efficient of resume audit

* small change

* fix audit cli

* bypass completed audit when dd restart

* fix auditStorageCommandActor

* make mismatch key range more visable

* address comments

* make local shard metadata check can make progress by retries

* address comments

* address comments

* partition location metadata validation by range and server

* unset MIN_TRACE_SEVERITY

* address comments and SS auto proceed until failed then notify dd

* persistNewAuditState should checkMoveKeysLock

* audit storage location metadata partitioned by range and move shard assignment history def to the end of SS structure

* code cleanup

* fix error message in metadata validation

* fix registerAuditsForShardAssignmentHistoryCollection input for local shard validation

* add comments to code and add guard to make sure the SS audit does not proceeds automatically for many times without being notified by DD --- to support audit cancellation later

* fix coalesceRangeList

* replace rangeOverlapping func with operator and use struct instead of complicated type for return value of getKeyServer/serverKey/shardInfo

* simplify shard assignment history

* shardAssignmentRecordRequests should be unorder_map

* address comments, make trackShardAssignment simple, make anyChildAuditFailed cover all audit children, keep only one audit actor run at a time on each SS

* only run validate shard info once at a time, other audit type does not have this limitation

---------

Co-authored-by: He Liu <heliu05023@gmail.com>
Co-authored-by: He Liu <heliu@apple.com>
Co-authored-by: Zhe Wang <zhewang@Zhes-Laptop.local>
2023-05-01 10:35:52 -07:00
Steve Atherton 16d8b1d1f9
Merge pull request #9949 from sfc-gh-etschannen/fix-shard-count
fix: do not let too many shards use large teams
2023-04-29 23:50:49 -07:00
neethuhaneesha 53fe07a709
Enabling auto_prefix_mode to true in rocksdb. (#10050) 2023-04-27 12:11:48 -07:00
He Liu e11f804f96
ShardedRocks checkpoint/restore for physical shard move (#9752)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* Refactored ShardedRocks checkpoint/restore for psm.

* Complete ShardedRocks::restore.

* dismiss operation_obsolete, and throw actor_cancelled.

* Validate checkpoint when !asKeyValues.

* fmt.

* Don't read from uninitialized physical shard.

* Resolved commments.

* cleanup.

* Added verify_checksum_before_restore for ShardedRocks.

* Added ShardedRocksDB checkpoint/restore unit test.

* Populate CheckpointMetaData::dir in RocksDB.

* Addressed comments.
2023-04-26 09:17:18 -07:00
sfc-gh-tclinkenbeard 9639192a88 Add GLOBAL_TAG_THROTTLING_REPORT_ONLY knob 2023-04-21 11:13:42 -07:00
Nim Wijetunga 22ba818133
Prevent Encryption Key Refresh for Non-Latest Keys (#9959)
prevent refresh for old encryption keys
2023-04-18 09:43:24 -07:00
sfc-gh-tclinkenbeard 7076c050d2 Decrease MIN_TAG_*_PAGES_RATE defaults 2023-04-17 15:16:29 -07:00
sfc-gh-tclinkenbeard a7217055c8 Update default value of MIN_TAG_WRITE_PAGES_RATE to match default value of MIN_TAG_READ_PAGES_RATE 2023-04-17 11:58:50 -07:00
sfc-gh-tclinkenbeard 4be3c3e7ff Fix initialization of SERVER_KNOBS->MIN_TAG_READ_PAGES_RATE 2023-04-17 11:58:50 -07:00
sfc-gh-tclinkenbeard 0f0eb7c2b6 Add GLOBAL_TAG_THROTTLING_TRACE_INTERVAL knob 2023-04-17 10:09:38 -07:00
Evan Tschannen 12e507e06c rename knobs 2023-04-13 09:40:37 -07:00
Xiaoxi Wang f7061debde remove unused CPU knob; add comments for EligibilityCounter 2023-04-12 09:33:05 -07:00
Xiaoxi Wang b0fe14aed5 getTeam based on EligiblityCount 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 7ca44124d4 explain what does pivot ratio mean; fix the knob assertion 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 5648f827a0 adjust CPU pivot knobs to hack simulation test 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 31fd4bb272 consider consistent low CPU status for 5min 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 490a7b534a add getAverageCPU method; delete default value of GetTeamRequest
arguments (solve conflicts)
2023-04-12 09:33:05 -07:00
Zhe Wu 10a6f3d2d0
Merge pull request #9890 from halfprice/zhewu/log-router-gray-failure
Gray failure detects disconnected remote log router and recover high DC lag
2023-04-07 16:25:11 -07:00
Hui Liu 396f89a3f4
Cleanup stale disk files for double recruitment of storage server (#9794) 2023-04-06 12:13:59 -07:00
Ata E Husain Bohra 625eb00d36
Relax EKP failure detection time for simulated runs (#9908)
Description

EKP failure detection time is choosen to be fairly low given EKP
availability could impact cluster availability. However, in
simulation runs, for various reasons such a low-latency failure
detection could cause EKP recruitment to be done in a loop.
Patch relaxes the failure detection time for simulation runs

Testing
2023-04-05 18:12:25 -07:00
Zhe Wu 3751641704 Disable GC Tlog generation due to a bug exposed by the new logic in the existing code 2023-04-04 08:12:03 -07:00
Zhe Wu 675663327d Adding a knob to control log router triggered recovery 2023-04-03 22:31:22 -07:00
Nim Wijetunga 2867443f95
Recurit EKP without Enabling Encryption (#9885)
Recruit EKP without needing to enable encryption
2023-04-03 20:05:21 -07:00
neethuhaneesha 1d6908d3b4
Changing single key deletions to delete based on number of deletes instead of bytelimit. (#9867) 2023-04-03 13:55:58 -07:00
Zhe Wu 7ab0ae8189
Merge pull request #9041 from halfprice/zhewu/gc-earlier-generations
Track TLog generation recovery and remove no longer needed TLog generations before recovery reaches to `fully_recovered`
2023-04-03 10:16:19 -07:00
Ata E Husain Bohra 054358e63f
EaR: Update REST validation token-name seperator from '#' -> '$' (#9848)
Description

RESTKms validation tokens are provided using foundationdb.conf, the file
uses '#' as comment start character. Update the token-name seperator to
'$' instead of '#'

Testing

RESTKmsConnectorUnit.toml
2023-03-30 15:40:09 -07:00
Ata E Husain Bohra 0e720634f3
EaR: Allow RESTKmsConnector validation token newline char sanitization (#9831)
Description

Patch proposes ability to remove newline characters from KMSConnector
validation tokens

Testing

RESTKmsConnectorUnit.toml
2023-03-29 16:56:46 -07:00
Xiaoxi Wang d691e94af2 rename median ratio to pivot ratio; extract updatePivotAvailableSpaceRatio function; add related knobs 2023-03-28 14:51:00 -07:00
Zhe Wu 33736ff9af Cleanup GcGeneration test and function documents 2023-03-27 12:31:44 -07:00
Zhe Wu 40dc54223c Add GC generation test, and make all simulation test passing 2023-03-27 11:46:13 -07:00
Zhe Wu 2da86c37aa Add a knob to guard track tlog recovery 2023-03-27 11:42:27 -07:00
Dan Adkins 02f0a44987
Avoid divide-by-zero in isKeyValueInSample. (#9799)
In the pathological case that both key size and value size are 0,
the probability of choosing that key-value pair is 0, and we divide
by zero when computing the sampledSize.

This change adds documentation to that function, which was quite
difficult to understand. In addition, we add `probability` to the
returned values, since one of the callers was backing it out from
sampledSize and itself in danger of dividing by zero.
2023-03-24 16:05:26 -04:00
neethuhaneesha 1e656210e1 Adding rocksdb bloom filter knobs. 2023-03-21 13:10:40 -07:00
neethuhaneesha 06657e1e0e
Rocksdb knob changes. (#9389) 2023-03-21 12:03:43 -07:00
He Liu 81c3cb8c50
Psm checkpoint (#9636)
* Update NativeAPI getCheckpointForRange().

* Implemented checkpoint in SS.

* clean up.

* Disabled StorageServerCheckpointTest.

* Serialized checkpoint creation and deletion.

Simplified checkpoint GC, via deleting CheckpointMetaData::dir.

* Fixed PhysicalShardMove test. Where fetchCheckpoint target range is misset.

* Minor improvements on CheckpointMetaData and DataMoveMetaData.

* fmt.

* Optimized PhysicalShardMove test

cleanup.

* dismiss operation_obsolete, and throw actor_cancelled.

* fmt.

* Resolved commments.
2023-03-21 09:14:10 -07:00
Evan Tschannen a258d775c3
Merge pull request #9710 from sfc-gh-etschannen/feature-custom-dd
Added the ability to manually create a shard and also increase its replication factor
2023-03-20 15:35:10 -07:00
Zhongxing Zhang d2c1b3124e
add a field to show average data movement bytes in MovingData trace (#9591)
* add a field to show average data movement bytes in MovingData trace

* change variable type

* Make changes to variable/function naming and add more comments

* move rolling window struct to a new file; deal with corner case: dd startup, elements are full

* format

* simplify codes

* modify file/struct name, universal to moving window

* fix typo

* add a new Knob to control MovingWindow::Deque size

* make the general use of dequeSize limit

* format

* format, use space rather than tab
2023-03-20 14:33:32 -07:00
Evan Tschannen 8e4eb83ba7 addressed review comments 2023-03-20 11:41:23 -07:00
Evan Tschannen 73767501d4 Merge branch 'main' into feature-custom-dd
# Conflicts:
#	fdbserver/tester.actor.cpp
2023-03-17 10:33:38 -07:00
He Liu 0f5e75b34b
Added newDataMoveId(). (#9647)
* Added newDataMoveId().

* Added `ENABLE_DD_PHYSICAL_SHARD_MOVE`

* fmt.

* Replace `teamId` with `shardId`.
2023-03-16 18:06:06 -07:00
A.J. Beamon 484a414117 Increase the buggified tag measurement interval to reduce trace spam 2023-03-16 11:53:45 -07:00
Evan Tschannen ac54962533 code cleanup 2023-03-16 09:47:21 -07:00
Evan Tschannen aaf7b9b32b Added the ability to manually create a shard and also increase its replication factor 2023-03-15 11:26:15 -07:00
Jingyu Zhou b755e668bf
Merge pull request #9601 from jzhou77/fix-head
Allow log router to detect slow peeks and to switch DC for peeking
2023-03-09 15:34:24 -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
Jingyu Zhou 0259a243ae Switch DC if log router peek becomes stuck
Trying to a different DC if this happens.
2023-03-06 17:41:56 -08:00
Josh Slocum e1b620135b Merge branch 'main' into bg_latency_fixes 2023-03-06 09:23:11 -06:00
Jingyu Zhou 8847e70be0
Merge pull request #9306 from kakaiu/add-physical-shard-meta-data-to-checkpoint
Dump checkpoint metadata to sst file
2023-03-03 14:45:50 -08:00
Xiaoxi Wang b13b586b71
Merge pull request #9547 from sfc-gh-xwang/feature/main/minReadBand
add knob for min read rebalance shard bandwidth
2023-03-03 09:37:23 -08:00