Commit Graph

227 Commits

Author SHA1 Message Date
Xiaoxi Wang a958436bf5 force blob migrator's ssi to be undesired; remove TCServerInfo from prepareBlobMigrator parameter list 2023-05-02 09:40:11 -07:00
Xiaoxi Wang fdc576a938 force blob migrator's ssi to be undesired 2023-05-02 09:40:11 -07:00
Xiaoxi Wang 880274ab48 add PrepareBlobRestoreRequest, and make DD handle the BlobRestore
prepare transactions

add DD Restore Preparing state; actor accept blob migrator requests

Refactor DDEnabledState and PrepareBlobRestoreReply

Improve the initialization, remove unused DDSharedContext method

move prepareBlobRestore to moveKeys

Make context->lock and DataDistributor.lock share the reference; change checkMoveKeysLock to checkPersistenMoveKeysLock; Add more debug trace

fix requestId assignment bug

Add DDEnabledState::sameId method

Throw movekeys_conflict after hybrid restore preparation to force reload
server list and shard mapping; format code; remove unused
methods,definition and comments

fix rebase conflicts

Make DD only load initial Data Distribution after enabled

use dd_config_changed error and throw it in serveBlobMigratorRequests

move empty range check before blob restore to the transaction lock database

Rename BlobRestore*
2023-05-02 09:40:11 -07:00
Xiaoxi Wang 3a8bdcca3d add metadata check to quiesent consistency check 2023-05-01 18:08:08 -07:00
Xiaoxi Wang 3605d8c74c populate storage metadata for tss 2023-05-01 18:08:08 -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
Zhongxing Zhang 7aa578f616
Merge pull request #10028 from sfc-gh-zhzhang/trace-team-eligibility
Add trace event "TeamEligibilityCount"
2023-04-26 16:11:39 -07:00
zhongxing.zhang c6df143a9c change variable names and adjust orders 2023-04-25 16:44:42 -07:00
zhongxing.zhang bb2c7e7c8e add two bool lowDiskUtil, lowCPU to reduce repeat code 2023-04-24 16:24:35 -07:00
zhongxing.zhang 5eaec76407 add lowDiskUtilLowCpu to indicate the overlap between lowCpu pool and lowDiskUtil pool 2023-04-23 14:36:32 -07:00
zhongxing.zhang 86a6171a27 Add trace event "TeamEligibilityCount" to indicate that how many team has passed CPU or Space pivot check. 2023-04-21 11:12:22 -07:00
Evan Tschannen f7dc2d9c76 fix: do not load the userRangeConfig if large teams are not enabled
fix: do not build a large team which is the same size as the storage team size
fix: large teams should not count towards the healthyTeamCount
2023-04-19 20:38:03 -07:00
Steve Atherton b7e68bbf51 DDConfiguration class for modeling user specified key range configuration options. Added KeyBackedRangeMapSnapshot, some other supporting changes to KeyBackedTypes. Added invalidKey to give KeyBackedTypes a safe prefix to avoid accidental userspace modification from uninitialized accessors. 2023-04-18 22:09:18 -07:00
Steve Atherton a4438d4542 Refactored and simplified KeyBackedTypes to base types KeyBackedProperty, KeyBackedMap, and KeyBackedSet. Object and BinaryValue variations are now redefined as customizations of the base types. Added WatchableTrigger for using a key to track a last updated version, supported by all KeyBackedTypes. KeyBackedStruct is renamed to KeyBackedClass contains a WatchableTrigger to pass to contained KeyBackTypes. 2023-04-18 21:48:55 -07:00
Xiaoxi Wang 2dbcd0f8ab fix pivot index calculation
assert valid value of AVAILABLE_SPACE_PIVOT_RATIO and CPU_PIVOT_RATIO
2023-04-17 12:24:18 -07:00
Xiaoxi Wang 50e1f629fe EligibilityCounter use int type; resolve review comments; 2023-04-17 12:24:17 -07:00
Evan Tschannen 12e507e06c rename knobs 2023-04-13 09:40:37 -07:00
Xiaoxi Wang b50459dd12 change the initial value of CPU pivot 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 737dd09572 set better knob for cpu cutoff unit test 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 7ce7e3c99e add cpu cutoff unit test 2023-04-12 09:33:05 -07:00
Xiaoxi Wang f7061debde remove unused CPU knob; add comments for EligibilityCounter 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 16a8ea0867 move EligibilityCounter to DataDistributionTeam.h; fix ParallelTCInfo compilation error; add MockDD definition of getStorageStats 2023-04-12 09:33:05 -07:00
Xiaoxi Wang bfae1f31e4 fix getCount() implementation 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 5648f827a0 adjust CPU pivot knobs to hack simulation test 2023-04-12 09:33:05 -07:00
Xiaoxi Wang 990ad26d8b fix segment fault caused by wrong iterator and index type 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
Xiaoxi Wang 2419edd874 rename getLoadReadBandwidth to getReadLoad; change the implementation of getReadLoad 2023-04-12 09:33:05 -07:00
Xiaoxi Wang e7b5b3cbe3 pull health metrics for each storage server in storageTracker (solve
conflicts)
2023-04-12 09:33:05 -07:00
Evan Tschannen b6831dee1b fix: the fallback path for too many large teams needs to be based on the number of shards rather than number of teams for instances where the large team uses the majority of servers 2023-04-11 12:07:25 -07:00
Josh Slocum 316658a28a solving strange recruitment deadlock in three_data_hall 2023-04-08 11:04:41 -07:00
A.J. Beamon 64b6a5d257 Allow boolean parameters to be nested inside of namespaces or classes 2023-03-30 15:09:59 -07:00
zhongxing.zhang ebb244b47b Merge remote-tracking branch 'upstream/main' into refactor-GetTeamRequest 2023-03-29 13:49:45 -07:00
zhongxing.zhang 72ff00a5ce change TeamSelect variables names, and update comment 2023-03-29 13:46:04 -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
zhongxing.zhang 93ef3e990e add the underscore to TeamSelect::value, and move out 'TeamSelect::INVALID' 2023-03-21 15:48:33 -07:00
zhongxing.zhang bad4ee745b Merge remote-tracking branch 'upstream/main' into refactor-GetTeamRequest 2023-03-21 14:57:28 -07:00
Evan Tschannen 8e4eb83ba7 addressed review comments 2023-03-20 11:41:23 -07:00
Evan Tschannen a7e1616de8 code cleanup 2023-03-17 14:57:07 -07:00
Evan Tschannen 6882f21c10 fix: only consider large team creation successful if the the has the correct size 2023-03-17 10:52:53 -07:00
Evan Tschannen de7f40d2f4 made a variety of improvements that came from code review 2023-03-17 10:30:34 -07:00
Evan Tschannen ac54962533 code cleanup 2023-03-16 09:47:21 -07:00
zhongxing.zhang 8d9e905258 refactor GetTeamRequest 2023-03-15 14:47:34 -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
Josh Slocum 03818e94f3
add exclusion tracker utility and use it in DD (#9669) 2023-03-15 08:21:28 -05:00
Jingyu Zhou 622520bd2d Return the source team if remote DC is dead
Also refactor the code with findTeamFromServers().
2023-02-10 11:11:07 -08:00
Jingyu Zhou 9aa15b459c Clean up trace events 2023-02-10 11:11:07 -08:00
Jingyu Zhou 6c4a9b5f23 Fix DD stuck when remote DC is dead
When remote DC is down, the remote team collection of DD can initializing
waiting for the remote to recover (all_tlog_recruited state). However, the
getTeam request can already be served by the remote team collection. So, for
a RelocateShard (data movement such as split, move), it will get a team for
the remote DC. But the data movement can't make progress on the remote team
because the remote DC hasn't recovered yet. Because of the stuck of data
movement, the primary cannot reach the "storage_recovered" state and stay in
accepting_commit state.

The specifc test failure: slow/ApiCorrectness.toml -s 339026305 -b on
at commit:  0edd899d65

In this test, primary DC has 1 SS killed, remote DC has 2 TLog and 2 SS killed.
So the remote is dead, the remaining 2 SSes can't make progress because of the
loss of 2 TLogs. The repairDeadDatacenter() can't reach the "storage_recovered"
state due to DD's failure of moving shards away from the killed SS in the
primary.

The fix is to exclude all remote in repairDeadDatacenter() so that tells DD to
mark all SSes in the remote as unhealthy. Another fix is to return empty
results for getTeam request if the remote team collection is not ready. This
will allow the data movement to continue, essentially remote team is not changed
for the data movement.
2023-02-10 11:11:07 -08:00
Yi Wu d3bc2afc8e
EaR: storage server uses encryption DB config (#9115)
The PR is updating storage server and Redwood to enable encryption based on the encryption mode in DB config, which was previously controlled by a knob. High level changes are
1. Passing encryption mode in DB config to storage server
    1.1 If it is a new storage server, pass the encryption mode through `InitializeStorageRequest`. the encryption mode is pass to Redwood for initialization
    1.2 If it is an existing storage server, on restart the storage server will send `GetStorageServerRejoinInfoRequest` to commit proxy, and commit proxy will return the current encryption mode, which it get from DB config on its own initialization. Storage server will compare the DB config encryption mode to the local storage encryption mode, and fail if they don't match
2. Adding a new `encryptionMode()` method to `IKeyValueStore`, which return a future of local encryption mode of the KV store instance. A KV store supporting encryption would need to persist its own encryption mode, and return the mode via the API.
3. Redwood accepts encryption mode from its constructor. For a new Redwood instance, caller has to specific the encryption mode, which will be stored in Redwood per-instance file header. For existing instance, caller is supposed to not passing the encryption mode, and let Redwood find it out from its own header.
4. Refactoring in Redwood to accommodate the above changes.
2023-02-06 14:02:31 -08:00