Fix initialization order

This commit is contained in:
Jingyu Zhou 2021-10-12 15:44:12 -07:00
parent f5bf1ee741
commit 44943d3866
2 changed files with 6 additions and 6 deletions

View File

@ -235,7 +235,7 @@ struct ReportRawCommittedVersionRequest {
Optional<Version> prevVersion,
Optional<std::set<Tag>> writtenTags = Optional<std::set<Tag>>())
: version(version), locked(locked), metadataVersion(metadataVersion),
minKnownCommittedVersion(minKnownCommittedVersion), writtenTags(writtenTags), prevVersion(prevVersion) {}
minKnownCommittedVersion(minKnownCommittedVersion), prevVersion(prevVersion), writtenTags(writtenTags) {}
template <class Ar>
void serialize(Ar& ar) {

View File

@ -289,15 +289,15 @@ struct MasterData : NonCopyable, ReferenceCounted<MasterData> {
backupWorkerDoneRequests("BackupWorkerDoneRequests", cc),
getLiveCommittedVersionRequests("GetLiveCommittedVersionRequests", cc),
reportLiveCommittedVersionRequests("ReportLiveCommittedVersionRequests", cc),
versionVectorSizeOnCVReply("VersionVectorSizeOnCVReply",
dbgid,
SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL,
SERVER_KNOBS->LATENCY_SAMPLE_SIZE),
masterRecoveryStateEventHolder(makeReference<EventCacheHolder>("MasterRecoveryState")),
masterRecoveryGenerationsEventHolder(makeReference<EventCacheHolder>("MasterRecoveryGenerations")),
masterRecoveryDurationEventHolder(makeReference<EventCacheHolder>("MasterRecoveryDuration")),
masterRecoveryAvailableEventHolder(makeReference<EventCacheHolder>("MasterRecoveryAvailable")),
recoveredConfigEventHolder(makeReference<EventCacheHolder>("RecoveredConfig")),
versionVectorSizeOnCVReply("VersionVectorSizeOnCVReply",
dbgid,
SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL,
SERVER_KNOBS->LATENCY_SAMPLE_SIZE) {
recoveredConfigEventHolder(makeReference<EventCacheHolder>("RecoveredConfig")) {
logger = traceCounters("MasterMetrics", dbgid, SERVER_KNOBS->WORKER_LOGGING_INTERVAL, &cc, "MasterMetrics");
if (forceRecovery && !myInterface.locality.dcId().present()) {
TraceEvent(SevError, "ForcedRecoveryRequiresDcID").log();