Track commit costs while ReportCommitCostEstimationRequest is in-flight
This commit is contained in:
parent
a21f657429
commit
9a258e087b
|
@ -2565,14 +2565,14 @@ ACTOR Future<Void> reportTxnTagCommitCost(UID myID,
|
|||
nextRequestTimer = Never();
|
||||
if (db->get().ratekeeper.present()) {
|
||||
nextReply = brokenPromiseToNever(db->get().ratekeeper.get().reportCommitCostEstimation.getReply(
|
||||
ReportCommitCostEstimationRequest(*ssTrTagCommitCost)));
|
||||
ReportCommitCostEstimationRequest(std::move(*ssTrTagCommitCost))));
|
||||
ssTrTagCommitCost->clear();
|
||||
} else {
|
||||
nextReply = Never();
|
||||
}
|
||||
}
|
||||
when(wait(nextReply)) {
|
||||
nextReply = Never();
|
||||
ssTrTagCommitCost->clear();
|
||||
nextRequestTimer = delay(SERVER_KNOBS->REPORT_TRANSACTION_COST_ESTIMATION_DELAY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,8 +150,9 @@ struct ReportCommitCostEstimationRequest {
|
|||
ReplyPromise<Void> reply;
|
||||
|
||||
ReportCommitCostEstimationRequest() {}
|
||||
ReportCommitCostEstimationRequest(UIDTransactionTagMap<TransactionCommitCostEstimation> ssTrTagCommitCost)
|
||||
: ssTrTagCommitCost(ssTrTagCommitCost) {}
|
||||
explicit ReportCommitCostEstimationRequest(
|
||||
UIDTransactionTagMap<TransactionCommitCostEstimation>&& ssTrTagCommitCost)
|
||||
: ssTrTagCommitCost(std::move(ssTrTagCommitCost)) {}
|
||||
|
||||
template <class Ar>
|
||||
void serialize(Ar& ar) {
|
||||
|
|
Loading…
Reference in New Issue