8000 Measure backlog after completing current task by dnr · Pull Request #4562 · temporalio/temporal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Measure backlog after completing current task #4562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2023
Merged

Conversation

dnr
Copy link
Member
@dnr dnr commented Jun 29, 2023

What changed?
PollWorkflowTaskQueue returns a hint for the backlog on the task queue polled, which is measured (approximately) as tasks in the taskReader buffer or pending return to a poller. When matching a task that came from the db, the task itself would be counted in the backlog, since the backlog was recorded at match time, instead of after marking the task acked.

This measures the backlog after marking the task acked.

Why?
SDKs always poll on the sticky queue if there is a backlog, so they could incorrectly poll on the sticky queue when there are no tasks there and neglect the normal queue, causing a delay of up to the long poll interval.

How did you test it?
manually for now

Potential risks

Is hotfix candidate?

@dnr dnr requested a review from a team as a code owner June 29, 2023 21:43
@dnr dnr merged commit 911d7c3 into temporalio:master Jun 30, 2023
@dnr dnr deleted the sched55 branch June 30, 2023 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0