Fix multiple compiler warnings
This commit is contained in:
parent
f83423c968
commit
37d9e975e9
|
@ -697,7 +697,7 @@ void MultiVersionTransaction::reset() {
|
|||
// MultiVersionDatabase
|
||||
MultiVersionDatabase::MultiVersionDatabase(MultiVersionApi* api, int threadIdx, std::string clusterFilePath,
|
||||
Reference<IDatabase> db, bool openConnectors)
|
||||
: dbState(new DatabaseState()), threadIdx(threadIdx) {
|
||||
: dbState(new DatabaseState()) {
|
||||
dbState->db = db;
|
||||
dbState->dbVar->set(db);
|
||||
|
||||
|
|
|
@ -369,7 +369,6 @@ private:
|
|||
};
|
||||
|
||||
const Reference<DatabaseState> dbState;
|
||||
const int threadIdx;
|
||||
friend class MultiVersionTransaction;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ const Value keyServersValue( Standalone<RangeResultRef> result, const std::vecto
|
|||
std::vector<Tag> destTag;
|
||||
|
||||
bool foundOldLocality = false;
|
||||
for (const KeyValueRef kv : result) {
|
||||
for (const KeyValueRef& kv : result) {
|
||||
UID uid = decodeServerTagKey(kv.key);
|
||||
if (std::find(src.begin(), src.end(), uid) != src.end()) {
|
||||
srcTag.push_back( decodeServerTagValue(kv.value) );
|
||||
|
@ -107,7 +107,7 @@ void decodeKeyServersValue( Standalone<RangeResultRef> result, const ValueRef& v
|
|||
src.clear();
|
||||
dest.clear();
|
||||
|
||||
for (const KeyValueRef kv : result) {
|
||||
for (const KeyValueRef& kv : result) {
|
||||
Tag tag = decodeServerTagValue(kv.value);
|
||||
if (std::find(srcTag.begin(), srcTag.end(), tag) != srcTag.end()) {
|
||||
src.push_back( decodeServerTagKey(kv.key) );
|
||||
|
@ -120,7 +120,7 @@ void decodeKeyServersValue( Standalone<RangeResultRef> result, const ValueRef& v
|
|||
std::sort(dest.begin(), dest.end());
|
||||
if(missingIsError && (src.size() != srcTag.size() || dest.size() != destTag.size())) {
|
||||
TraceEvent(SevError, "AttemptedToDecodeMissingTag");
|
||||
for (const KeyValueRef kv : result) {
|
||||
for (const KeyValueRef& kv : result) {
|
||||
Tag tag = decodeServerTagValue(kv.value);
|
||||
UID serverID = decodeServerTagKey(kv.key);
|
||||
TraceEvent("TagUIDMap").detail("Tag", tag.toString()).detail("UID", serverID.toString());
|
||||
|
|
|
@ -121,7 +121,7 @@ std::map<std::tuple<LogEpoch, Version, int>, std::map<Tag, Version>> BackupProgr
|
|||
}
|
||||
}
|
||||
|
||||
for (const Tag tag : tags) { // tags without progress data
|
||||
for (const Tag& tag : tags) { // tags without progress data
|
||||
tagVersions.insert({ tag, adjustedBeginVersion });
|
||||
TraceEvent("BackupVersionRange", dbgid)
|
||||
.detail("OldEpoch", epoch)
|
||||
|
|
|
@ -504,7 +504,7 @@ ACTOR Future<Void> setBackupKeys(BackupData* self, std::map<UID, Version> savedL
|
|||
state std::vector<Future<Optional<Version>>> prevVersions;
|
||||
state std::vector<BackupConfig> versionConfigs;
|
||||
state std::vector<Future<Optional<bool>>> allWorkersReady;
|
||||
for (const auto [uid, version] : savedLogVersions) {
|
||||
for (const auto& [uid, version] : savedLogVersions) {
|
||||
versionConfigs.emplace_back(uid);
|
||||
prevVersions.push_back(versionConfigs.back().latestBackupWorkerSavedVersion().get(tr));
|
||||
allWorkersReady.push_back(versionConfigs.back().allWorkerStarted().get(tr));
|
||||
|
@ -569,7 +569,7 @@ ACTOR Future<Void> monitorBackupProgress(BackupData* self) {
|
|||
if (self->recruitedEpoch == self->oldestBackupEpoch) {
|
||||
// update update progress so far if previous epochs are done
|
||||
Version v = std::numeric_limits<Version>::max();
|
||||
for (const auto [tag, version] : tagVersions) {
|
||||
for (const auto& [tag, version] : tagVersions) {
|
||||
v = std::min(v, version);
|
||||
}
|
||||
savedLogVersions.emplace(uid, v);
|
||||
|
@ -781,7 +781,7 @@ ACTOR Future<Void> saveMutationsToFile(BackupData* self, Version popVersion, int
|
|||
.detail("TagId", self->tag.id)
|
||||
.detail("File", file->getFileName());
|
||||
}
|
||||
for (const UID uid : activeUids) {
|
||||
for (const UID& uid : activeUids) {
|
||||
self->backups[uid].lastSavedVersion = popVersion + 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2294,7 +2294,7 @@ ACTOR Future<Void> masterProxyServerCore(
|
|||
state KeyRange txnKeys = allKeys;
|
||||
Standalone<RangeResultRef> UIDtoTagMap = commitData.txnStateStore->readRange( serverTagKeys ).get();
|
||||
state std::map<Tag, UID> tag_uid;
|
||||
for (const KeyValueRef kv : UIDtoTagMap) {
|
||||
for (const KeyValueRef& kv : UIDtoTagMap) {
|
||||
tag_uid[decodeServerTagValue(kv.value)] = decodeServerTagKey(kv.key);
|
||||
}
|
||||
loop {
|
||||
|
|
Loading…
Reference in New Issue