FastRestore:Applier:Add fetchKeys counter

This commit is contained in:
Meng Xu 2020-02-26 11:27:30 -08:00
parent 8506bce493
commit fbf5020af9
3 changed files with 4 additions and 4 deletions

View File

@ -306,6 +306,7 @@ ACTOR static Future<Void> precomputeMutationsResult(Reference<ApplierBatchData>
for (; stagingKeyIter != batchData->stagingKeys.end(); stagingKeyIter++) {
if (!stagingKeyIter->second.hasBaseValue()) {
imcompleteStagingKeys.emplace(stagingKeyIter->first, stagingKeyIter);
batchData->counters.fetchKeys++;
}
}

View File

@ -218,13 +218,14 @@ struct ApplierBatchData : public ReferenceCounted<ApplierBatchData> {
Counter receivedBytes, receivedWeightedBytes, receivedMutations, receivedAtomicOps;
Counter appliedWeightedBytes, appliedMutations, appliedAtomicOps;
Counter appliedTxns;
Counter fetchKeys; // number of keys to fetch from dest. FDB cluster.
Counters(ApplierBatchData* self, UID applierInterfID, int batchIndex)
: cc("ApplierBatch", applierInterfID.toString() + ":" + std::to_string(batchIndex)),
receivedBytes("ReceivedBytes", cc), receivedMutations("ReceivedMutations", cc),
receivedAtomicOps("ReceivedAtomicOps", cc), receivedWeightedBytes("ReceivedWeightedMutations", cc),
appliedWeightedBytes("AppliedWeightedBytes", cc), appliedMutations("AppliedMutations", cc),
appliedAtomicOps("AppliedAtomicOps", cc), appliedTxns("AppliedTxns", cc) {}
appliedAtomicOps("AppliedAtomicOps", cc), appliedTxns("AppliedTxns", cc), fetchKeys("FetchKeys", cc) {}
} counters;
void addref() { return ReferenceCounted<ApplierBatchData>::addref(); }

View File

@ -45,8 +45,6 @@
// TODO: Merge this RestoreConfig with the original RestoreConfig in FileBackupAgent.actor.cpp
// For convenience
typedef FileBackupAgent::ERestoreState ERestoreState;
// template <> Tuple Codec<ERestoreState>::pack(ERestoreState const& val);
// template <> ERestoreState Codec<ERestoreState>::unpack(Tuple const& val);
template<> inline Tuple Codec<ERestoreState>::pack(ERestoreState const &val) { return Tuple().append(val); }
template<> inline ERestoreState Codec<ERestoreState>::unpack(Tuple const &val) { return (ERestoreState)val.getInt(0); }
@ -365,4 +363,4 @@ Future<Void> sendBatchRequests(RequestStream<Request> Interface::*channel, std::
}
#include "flow/unactorcompiler.h"
#endif // FDBCLIENT_Restore_H
#endif // FDBSERVER_RESTORECOMMON_ACTOR_H