Skip to content

Fixing reqlog queuetime for verify-retry#6070

Open
riverszhang89 wants to merge 1 commit into
bloomberg:mainfrom
riverszhang89:txn_queue_time
Open

Fixing reqlog queuetime for verify-retry#6070
riverszhang89 wants to merge 1 commit into
bloomberg:mainfrom
riverszhang89:txn_queue_time

Conversation

@riverszhang89

Copy link
Copy Markdown
Contributor

clnt->enque_timeus is calculated exactly once per thdpool_enqueue, whereas clnt->deque_timeus is re-calculated on each sqlengine_work_appsock call. This causes inline retries from a verify error to inflate reqlog's queuetime (queuetime = deque_timeus - enque_timeus).

This patch moves the deque_timeus stamping to sqlengine_work_appsock_pp, so that it's truly the time when dequeue from the thread pool happens.

`clnt->enque_timeus` is calculated exactly once per `thdpool_enqueue`,
whereas `clnt->deque_timeus` is re-calculated on each `sqlengine_work_appsock`
call. This causes inline retries from a verify error to inflate reqlog's
queuetime (`queuetime = deque_timeus - enque_timeus`).

This patch moves the `deque_timeus` stamping to `sqlengine_work_appsock_pp`,
so that it's truly the time when dequeue from the thread pool happens.

Signed-off-by: Rivers Zhang <hzhang320@bloomberg.net>
@riverszhang89

Copy link
Copy Markdown
Contributor Author

#5962 would also work around the inflated reqlog queuetime from verify-retry. Regardless sqlengine_work_appsock_pp is the correct place to stamp clnt->deque_timeus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant