forked from apple/foundationdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Teams and SS mappings
Jingyu Zhou edited this page Oct 25, 2021
·
3 revisions
\xff
key space is system key space. Part of it is txnStateStore
, also stored on TLogs.
// A map from teamId to list of storage servers in that team.
extern const KeyRef storageTeamIdKeyPrefix;
// A map from storage server ID to list of teams associated with that SS.
// The first team in the list is that storage server's own team, i.e., no
// other storage servers are in that team.
extern const KeyRef storageServerToTeamIdKeyPrefix;
Master assignes seed storage servers to unique teams in sendInitialCommitToResolvers. Key is storageServerToTeamIdKey(ss)
, value is encodeStorageServerToTeamIdValue({ teamId })
in txnStateStore
, which is broadcast to all commit proxies.
Commit proxy receives TxnStateRequest
broadcast, and populates commitData.ssToStorageTeam
map, i.e., the map of SS's own team.
applyMetadataMutations()
does several things:
- Generate private mutations for specific or all storage servers, e.g.,
serverKeys
orserverTags
mutations. - Update
txnStateStore
so that all proxies have the exact the same copy
Each SS's own team: typical mapping is ptxn::StorageTeamID team(tag.locality, tag.id);