FastRestore:Remove unused field in RestoreRequest
This commit is contained in:
parent
ae86b5bb68
commit
7b5d43da9c
|
@ -3691,8 +3691,7 @@ public:
|
|||
auto range = backupRanges[restoreIndex];
|
||||
Standalone<StringRef> restoreTag(backupTag.toString() + "_" + std::to_string(restoreIndex));
|
||||
// Register the request request in DB, which will be picked up by restore worker leader
|
||||
struct RestoreRequest restoreRequest(restoreIndex, restoreTag, bcUrl, true, targetVersion, true,
|
||||
range, Key(), Key(), lockDB,
|
||||
struct RestoreRequest restoreRequest(restoreIndex, restoreTag, bcUrl, targetVersion, range,
|
||||
deterministicRandom()->randomUniqueID());
|
||||
tr->set(restoreRequestKeyFor(restoreRequest.index), restoreRequestValue(restoreRequest));
|
||||
}
|
||||
|
|
|
@ -540,42 +540,27 @@ struct RestoreRequest {
|
|||
int index;
|
||||
Key tagName;
|
||||
Key url;
|
||||
bool waitForComplete;
|
||||
Version targetVersion;
|
||||
bool verbose;
|
||||
KeyRange range;
|
||||
Key addPrefix;
|
||||
Key removePrefix;
|
||||
bool lockDB;
|
||||
UID randomUid;
|
||||
|
||||
std::vector<int> restoreRequests;
|
||||
// Key restoreTag;
|
||||
|
||||
ReplyPromise<struct RestoreCommonReply> reply;
|
||||
|
||||
RestoreRequest() = default;
|
||||
explicit RestoreRequest(const int index, const Key& tagName, const Key& url, bool waitForComplete,
|
||||
Version targetVersion, bool verbose, const KeyRange& range, const Key& addPrefix,
|
||||
const Key& removePrefix, bool lockDB, const UID& randomUid)
|
||||
: index(index), tagName(tagName), url(url), waitForComplete(waitForComplete), targetVersion(targetVersion),
|
||||
verbose(verbose), range(range), addPrefix(addPrefix), removePrefix(removePrefix), lockDB(lockDB),
|
||||
randomUid(randomUid) {}
|
||||
explicit RestoreRequest(const int index, const Key& tagName, const Key& url, Version targetVersion,
|
||||
const KeyRange& range, const UID& randomUid)
|
||||
: index(index), tagName(tagName), url(url), targetVersion(targetVersion), range(range), randomUid(randomUid) {}
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
serializer(ar, index, tagName, url, waitForComplete, targetVersion, verbose, range, addPrefix, removePrefix,
|
||||
lockDB, randomUid, restoreRequests, reply);
|
||||
serializer(ar, index, tagName, url, targetVersion, range, randomUid, reply);
|
||||
}
|
||||
|
||||
std::string toString() const {
|
||||
std::stringstream ss;
|
||||
ss << "index:" << std::to_string(index) << " tagName:" << tagName.contents().toString()
|
||||
<< " url:" << url.contents().toString() << " waitForComplete:" << std::to_string(waitForComplete)
|
||||
<< " targetVersion:" << std::to_string(targetVersion) << " verbose:" << std::to_string(verbose)
|
||||
<< " range:" << range.toString() << " addPrefix:" << addPrefix.contents().toString()
|
||||
<< " removePrefix:" << removePrefix.contents().toString() << " lockDB:" << std::to_string(lockDB)
|
||||
<< " randomUid:" << randomUid.toString();
|
||||
<< " url:" << url.contents().toString() << " targetVersion:" << std::to_string(targetVersion)
|
||||
<< " range:" << range.toString() << " randomUid:" << randomUid.toString();
|
||||
return ss.str();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -220,7 +220,7 @@ ACTOR static Future<Void> getAndComputeStagingKeys(
|
|||
ASSERT(fValues.size() == incompleteStagingKeys.size());
|
||||
int i = 0;
|
||||
for (auto& key : incompleteStagingKeys) {
|
||||
if (!fValues[i].get().present()) {
|
||||
if (!fValues[i].get().present()) { // Debug info to understand which key does not exist in DB
|
||||
TraceEvent(SevWarn, "FastRestoreApplierGetAndComputeStagingKeysNoBaseValueInDB")
|
||||
.detail("Key", key.first)
|
||||
.detail("Reason", "Not found in DB")
|
||||
|
@ -253,7 +253,7 @@ ACTOR static Future<Void> getAndComputeStagingKeys(
|
|||
ACTOR static Future<Void> precomputeMutationsResult(Reference<ApplierBatchData> batchData, UID applierID,
|
||||
int64_t batchIndex, Database cx) {
|
||||
// Apply range mutations (i.e., clearRange) to database cx
|
||||
TraceEvent("FastRestoreApplerPhasePrecomputeMutationsResult", applierID)
|
||||
TraceEvent("FastRestoreApplerPhasePrecomputeMutationsResultStart", applierID)
|
||||
.detail("BatchIndex", batchIndex)
|
||||
.detail("Step", "Applying clear range mutations to DB")
|
||||
.detail("ClearRanges", batchData->stagingKeyRanges.size());
|
||||
|
@ -420,7 +420,7 @@ ACTOR static Future<Void> applyStagingKeys(Reference<ApplierBatchData> batchData
|
|||
std::map<Key, StagingKey>::iterator cur = begin;
|
||||
double txnSize = 0;
|
||||
std::vector<Future<Void>> fBatches;
|
||||
TraceEvent("FastRestoreApplerPhaseApplyStagingKeys", applierID)
|
||||
TraceEvent("FastRestoreApplerPhaseApplyStagingKeysStart", applierID)
|
||||
.detail("BatchIndex", batchIndex)
|
||||
.detail("StagingKeys", batchData->stagingKeys.size());
|
||||
while (cur != batchData->stagingKeys.end()) {
|
||||
|
|
Loading…
Reference in New Issue