From 415970a47bbd54e14f95314b6e118a775f55585e Mon Sep 17 00:00:00 2001 From: Jingyu Zhou Date: Thu, 3 Feb 2022 15:44:34 -0800 Subject: [PATCH] Fix compiler warnings Initialization order issue. --- fdbclient/IClientApi.h | 2 +- fdbclient/NativeAPI.actor.h | 3 +-- fdbserver/TagPartitionedLogSystem.actor.h | 4 ++-- fdbserver/masterserver.actor.cpp | 5 +++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fdbclient/IClientApi.h b/fdbclient/IClientApi.h index a160e241b4..8e13c532a4 100644 --- a/fdbclient/IClientApi.h +++ b/fdbclient/IClientApi.h @@ -27,7 +27,7 @@ #include "flow/ThreadHelper.actor.h" -class VersionVector; +struct VersionVector; // An interface that represents a transaction created by a client class ITransaction { diff --git a/fdbclient/NativeAPI.actor.h b/fdbclient/NativeAPI.actor.h index 6ba2607bd5..a3fcc779b8 100644 --- a/fdbclient/NativeAPI.actor.h +++ b/fdbclient/NativeAPI.actor.h @@ -237,12 +237,11 @@ struct TransactionState : ReferenceCounted { Reference trLogInfo; TransactionOptions options; - bool readVersionObtainedFromGrvProxy; - Optional debugID; TaskPriority taskID; SpanID spanID; UseProvisionalProxies useProvisionalProxies = UseProvisionalProxies::False; + bool readVersionObtainedFromGrvProxy; int numErrors = 0; double startTime = 0; diff --git a/fdbserver/TagPartitionedLogSystem.actor.h b/fdbserver/TagPartitionedLogSystem.actor.h index 5782fffbad..ade3c0d45c 100644 --- a/fdbserver/TagPartitionedLogSystem.actor.h +++ b/fdbserver/TagPartitionedLogSystem.actor.h @@ -126,9 +126,9 @@ struct TagPartitionedLogSystem final : ILogSystem, ReferenceCounted>> addActor = Optional>>()) : dbgid(dbgid), logSystemType(LogSystemType::empty), expectedLogSets(0), logRouterTags(0), txsTags(0), - repopulateRegionAntiQuorum(0), stopped(false), epoch(e), oldestBackupEpoch(0), maxRv(0), + repopulateRegionAntiQuorum(0), stopped(false), epoch(e), oldestBackupEpoch(0), recoveryCompleteWrittenToCoreState(false), remoteLogsWrittenToCoreState(false), hasRemoteServers(false), - locality(locality), addActor(addActor), popActors(false) {} + maxRv(0), locality(locality), addActor(addActor), popActors(false) {} void stopRejoins() final; diff --git a/fdbserver/masterserver.actor.cpp b/fdbserver/masterserver.actor.cpp index 33e4f19039..5960c15e18 100644 --- a/fdbserver/masterserver.actor.cpp +++ b/fdbserver/masterserver.actor.cpp @@ -115,7 +115,7 @@ struct MasterData : NonCopyable, ReferenceCounted { reportLiveCommittedVersionRequests("ReportLiveCommittedVersionRequests", cc), versionVectorTagUpdates("VersionVectorTagUpdates", cc), waitForPrevCommitRequests("WaitForPrevCommitRequests", cc), - nonWaitForPrevCommitRequests("NonWaitForPrevCommitRequests", cc), addActor(addActor), + nonWaitForPrevCommitRequests("NonWaitForPrevCommitRequests", cc), versionVectorSizeOnCVReply("VersionVectorSizeOnCVReply", dbgid, SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL, @@ -123,7 +123,8 @@ struct MasterData : NonCopyable, ReferenceCounted { waitForPrevLatencies("WaitForPrevLatencies", dbgid, SERVER_KNOBS->LATENCY_METRICS_LOGGING_INTERVAL, - SERVER_KNOBS->LATENCY_SAMPLE_SIZE) { + SERVER_KNOBS->LATENCY_SAMPLE_SIZE), + addActor(addActor) { logger = traceCounters("MasterMetrics", dbgid, SERVER_KNOBS->WORKER_LOGGING_INTERVAL, &cc, "MasterMetrics"); if (forceRecovery && !myInterface.locality.dcId().present()) { TraceEvent(SevError, "ForcedRecoveryRequiresDcID").log();