added more comments

This commit is contained in:
Jon Fu 2021-01-04 16:00:12 -05:00
parent 53d23d95d8
commit a0d33c5d03
1 changed files with 18 additions and 10 deletions

View File

@ -202,8 +202,8 @@ extern const KeyRef configKeysPrefix;
// These are inside configKeysPrefix since they represent a form of configuration and they are convenient // These are inside configKeysPrefix since they represent a form of configuration and they are convenient
// to track in the same way by the tlog and recovery process, but they are ignored by the DatabaseConfiguration // to track in the same way by the tlog and recovery process, but they are ignored by the DatabaseConfiguration
// class. // class.
// The existence of an empty string as a value signifies that the provided IP has been excluded. // The existence of an empty string as a value signifies that the provided IP has been excluded.
// (as opposed to having no value at all) // (as opposed to having no value at all)
extern const KeyRef excludedServersPrefix; extern const KeyRef excludedServersPrefix;
extern const KeyRangeRef excludedServersKeys; extern const KeyRangeRef excludedServersKeys;
extern const KeyRef excludedServersVersionKey; // The value of this key shall be changed by any transaction that modifies the excluded servers list extern const KeyRef excludedServersVersionKey; // The value of this key shall be changed by any transaction that modifies the excluded servers list
@ -215,17 +215,17 @@ std::string encodeExcludedServersKey( AddressExclusion const& );
// These are inside configKeysPrefix since they represent a form of configuration and they are convenient // These are inside configKeysPrefix since they represent a form of configuration and they are convenient
// to track in the same way by the tlog and recovery process, but they are ignored by the DatabaseConfiguration // to track in the same way by the tlog and recovery process, but they are ignored by the DatabaseConfiguration
// class. // class.
// The existence of an empty string as a value signifies that the provided IP has been marked as failed. // The existence of an empty string as a value signifies that the provided IP has been marked as failed.
// (as opposed to having no value at all) // (as opposed to having no value at all)
extern const KeyRef failedServersPrefix; extern const KeyRef failedServersPrefix;
extern const KeyRangeRef failedServersKeys; extern const KeyRangeRef failedServersKeys;
extern const KeyRef failedServersVersionKey; // The value of this key shall be changed by any transaction that modifies the failed servers list extern const KeyRef failedServersVersionKey; // The value of this key shall be changed by any transaction that modifies the failed servers list
const AddressExclusion decodeFailedServersKey( KeyRef const& key ); // where key.startsWith(failedServersPrefix) const AddressExclusion decodeFailedServersKey( KeyRef const& key ); // where key.startsWith(failedServersPrefix)
std::string encodeFailedServersKey( AddressExclusion const& ); std::string encodeFailedServersKey( AddressExclusion const& );
// "\xff/workers/[[processID]]" := "" // "\xff/workers/[[processID]]" := ""
// Asynchronously updated by the cluster controller, this is a list of fdbserver processes that have joined the cluster // Asynchronously updated by the cluster controller, this is a list of fdbserver processes that have joined the cluster
// and are currently (recently) available // and are currently (recently) available
extern const KeyRangeRef workerListKeys; extern const KeyRangeRef workerListKeys;
extern const KeyRef workerListPrefix; extern const KeyRef workerListPrefix;
const Key workerListKeyFor(StringRef processID ); const Key workerListKeyFor(StringRef processID );
@ -233,7 +233,7 @@ const Value workerListValue( ProcessData const& );
Key decodeWorkerListKey( KeyRef const& ); Key decodeWorkerListKey( KeyRef const& );
ProcessData decodeWorkerListValue( ValueRef const& ); ProcessData decodeWorkerListValue( ValueRef const& );
// "\xff\x02/backupProgress/[[workerID]]" := "[[WorkerBackupStatus]]" // "\xff\x02/backupProgress/[[workerID]]" := "[[WorkerBackupStatus]]"
// Provides the progress for the given backup worker. // Provides the progress for the given backup worker.
// See "FDBTypes.h" struct WorkerBackupStatus for more details on the return type value. // See "FDBTypes.h" struct WorkerBackupStatus for more details on the return type value.
extern const KeyRangeRef backupProgressKeys; extern const KeyRangeRef backupProgressKeys;
@ -255,18 +255,25 @@ std::vector<std::pair<UID, Version>> decodeBackupStartedValue(const ValueRef& va
// 1 = Send a signal to pause/already paused. // 1 = Send a signal to pause/already paused.
extern const KeyRef backupPausedKey; extern const KeyRef backupPausedKey;
// "\xff/coordinators = [[ClusterConnectionString]]" // "\xff/coordinators" = "[[ClusterConnectionString]]"
// Set to the encoded structure of the cluster's current set of coordinators. // Set to the encoded structure of the cluster's current set of coordinators.
// Changed when performing quorumChange. // Changed when performing quorumChange.
// See "CoordinationInterface.h" struct ClusterConnectionString for more details // See "CoordinationInterface.h" struct ClusterConnectionString for more details
extern const KeyRef coordinatorsKey; extern const KeyRef coordinatorsKey;
// "\xff/logs" = "[[LogsValue]]"
// Used during master recovery in order to communicate
// and store info about the logs system.
extern const KeyRef logsKey; extern const KeyRef logsKey;
// "\xff/minRequiredCommitVersion" = "[[Version]]"
// Used during backup/recovery to restrict version requirements
extern const KeyRef minRequiredCommitVersionKey; extern const KeyRef minRequiredCommitVersionKey;
const Value logsValue( const vector<std::pair<UID, NetworkAddress>>& logs, const vector<std::pair<UID, NetworkAddress>>& oldLogs ); const Value logsValue( const vector<std::pair<UID, NetworkAddress>>& logs, const vector<std::pair<UID, NetworkAddress>>& oldLogs );
std::pair<vector<std::pair<UID, NetworkAddress>>,vector<std::pair<UID, NetworkAddress>>> decodeLogsValue( const ValueRef& value ); std::pair<vector<std::pair<UID, NetworkAddress>>,vector<std::pair<UID, NetworkAddress>>> decodeLogsValue( const ValueRef& value );
// The "global keys" are send to each storage server any time they are changed // The "global keys" are sent to each storage server any time they are changed
extern const KeyRef globalKeysPrefix; extern const KeyRef globalKeysPrefix;
extern const KeyRef lastEpochEndKey; extern const KeyRef lastEpochEndKey;
extern const KeyRef lastEpochEndPrivateKey; extern const KeyRef lastEpochEndPrivateKey;
@ -294,6 +301,7 @@ extern const KeyRef tagThrottleLimitKey;
extern const KeyRef tagThrottleCountKey; extern const KeyRef tagThrottleCountKey;
// Log Range constant variables // Log Range constant variables
// Used in the backup pipeline to track mutations
// \xff/logRanges/[16-byte UID][begin key] := serialize( make_pair([end key], [destination key prefix]), IncludeVersion() ) // \xff/logRanges/[16-byte UID][begin key] := serialize( make_pair([end key], [destination key prefix]), IncludeVersion() )
extern const KeyRangeRef logRangesRange; extern const KeyRangeRef logRangesRange;