Skip to content

Commit

Permalink
req_fsm: Avoid misleading Timestamp:Process
Browse files Browse the repository at this point in the history
When `vcl_deliver` does not return `deliver` the timestamp ends
up being a duplicate of the `synth` equivalent or the `restart`
timestamp.
  • Loading branch information
scance authored and dridi committed Feb 14, 2024
1 parent 223847e commit 88d927a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/varnishd/cache/cache_req_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ cnt_deliver(struct worker *wrk, struct req *req)
req->t_resp = W_TIM_real(wrk);
VCL_deliver_method(req->vcl, wrk, req, NULL, NULL);

VSLb_ts_req(req, "Process", W_TIM_real(wrk));

assert(req->restarts <= cache_param->max_restarts);

if (wrk->vpi->handling != VCL_RET_DELIVER) {
Expand All @@ -259,6 +257,8 @@ cnt_deliver(struct worker *wrk, struct req *req)
return (REQ_FSM_MORE);
}

VSLb_ts_req(req, "Process", W_TIM_real(wrk));

assert(wrk->vpi->handling == VCL_RET_DELIVER);

if (IS_TOPREQ(req) && RFC2616_Do_Cond(req))
Expand Down
1 change: 0 additions & 1 deletion bin/varnishtest/tests/s00004.vtc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ logexpect l1 -v v1 -g request {
expect * = Timestamp {Start: \S+ 0\.000000 0\.000000}
expect * = Timestamp {Req: \S+ 0\.\d+ 0\.\d+}
expect * = Timestamp {Fetch: \S+ [0-4]\.\d+ [0-4]\.\d+}
expect * = Timestamp {Process: \S+ 2\.\d+ 0\.\d+}
expect * = Timestamp {Restart: \S+ 2\.\d+ 0\.\d+}
expect * = End
expect 0 1002 Begin bereq
Expand Down

0 comments on commit 88d927a

Please sign in to comment.