Fixed another build error. Do not use timeReplyIgnoreError since we don not want the logging inside that function and thus that's unnecessary anymore. Change to use ready() which basically ignores the error.

This commit is contained in:
Xin Dong 2020-01-31 15:48:29 -08:00
parent c1f992667b
commit 7016f7903b
2 changed files with 2 additions and 15 deletions

View File

@ -556,7 +556,7 @@ DatabaseContext::DatabaseContext(const Error& err)
transactionsCommitCompleted("CommitCompleted", cc), transactionsTooOld("TooOld", cc),
transactionsFutureVersions("FutureVersions", cc), transactionsNotCommitted("NotCommitted", cc),
transactionsMaybeCommitted("MaybeCommitted", cc), transactionsResourceConstrained("ResourceConstrained", cc),
transactionsThrottled("Throttled", cc) transactionsProcessBehind("ProcessBehind", cc), latencies(1000),
transactionsThrottled("Throttled", cc), transactionsProcessBehind("ProcessBehind", cc), latencies(1000),
readLatencies(1000), commitLatencies(1000), GRVLatencies(1000), mutationsPerCommit(1000), bytesPerCommit(1000),
internal(false) {}
@ -3070,7 +3070,7 @@ ACTOR Future<Void> readVersionBatcher( DatabaseContext *cx, FutureStream< std::p
// dynamic batching
Promise<GetReadVersionReply> GRVReply;
requests.push_back(GRVReply);
addActor.send(timeReplyIgnoreError(GRVReply.getFuture(), replyTimes));
addActor.send(ready(timeReply(GRVReply.getFuture(), replyTimes)));
Future<Void> batch = incrementalBroadcastWithError(
getConsistentReadVersion(cx, count, flags, std::move(debugID)),

View File

@ -1687,19 +1687,6 @@ Future<Void> timeReply(Future<T> replyToTime, PromiseStream<double> timeOutput){
return Void();
}
ACTOR template <class T>
Future<Void> timeReplyIgnoreError(Future<T> replyToTime, PromiseStream<double> timeOutput) {
state double startTime = now();
try {
T _ = wait(replyToTime);
wait(delay(0));
timeOutput.send(now() - startTime);
} catch (Error& e) {
// Ignore the error and don't send out the time.
TraceEvent(SevWarn, "ErrorInTimeReplyIgnoreError").error(e);
}
return Void();
}
#include "flow/unactorcompiler.h"