Revert "Ensure a new timestamp is obtained in FI filter (#26167)" (#26575)

This reverts commit 1e2311c1ce.
pull/26685/head
Lidi Zheng 3 years ago committed by GitHub
parent 048d6be581
commit c26f53cee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/ext/filters/fault_injection/fault_injection_filter.cc

@ -428,12 +428,6 @@ void CallData::DelayBatch(grpc_call_element* elem,
MutexLock lock(&delay_mu_);
delayed_batch_ = batch;
resume_batch_canceller_ = new ResumeBatchCanceller(elem);
// Without this line, ExecCtx::Get()->Now() will return a cached timestamp. If
// there are thousands of RPCs happen on one thread, we might observe ms-level
// error in Now(). This could mean the construction of RPC object is
// microseconds earlier than the filter execution. But we still haven't found
// the root cause. Read more: https://github.com/grpc/grpc/pull/25738.
ExecCtx::Get()->InvalidateNow();
grpc_millis resume_time = ExecCtx::Get()->Now() + fi_policy_->delay;
GRPC_CLOSURE_INIT(&batch->handler_private.closure, ResumeBatch, elem,
grpc_schedule_on_exec_ctx);

Loading…
Cancel
Save