Skip to content

Document known accuracy limitations for ApproximateBacklogCount#4392

Open
dustin-temporal wants to merge 5 commits intomainfrom
dustin/backlog-accuracy-limitations
Open

Document known accuracy limitations for ApproximateBacklogCount#4392
dustin-temporal wants to merge 5 commits intomainfrom
dustin/backlog-accuracy-limitations

Conversation

@dustin-temporal
Copy link
Copy Markdown
Contributor

@dustin-temporal dustin-temporal commented Apr 6, 2026

Summary

  • Adds a "Known accuracy limitations" section to the worker performance page explaining two scenarios where ApproximateBacklogCount can be temporarily inaccurate:
    • Overcount from cancelled Workflows - pending Tasks from cancelled Workflows inflate the count until they expire
    • Reset to zero on partition unload - idle Task Queues (no pollers, no new Tasks for ~5 min) lose their count when the partition is unloaded
  • Consolidates the existing sticky queue caveat into the same section
  • Adds a cross-reference note to the Cloud metrics reference (temporal_cloud_v1_approximate_backlog_count)

Context

These limitations were identified during internal discussion with the matching team (Shahab, Nish). Both behaviors are explainable and expected, but not currently documented - leading to customer confusion.

Test plan

  • Verify the anchor link #backlog-accuracy-limitations works from the Cloud metrics reference page
  • Review rendering of the :::note admonition in the metrics reference

🤖 Generated with Claude Code

┆Attachments: EDU-6164 Document known accuracy limitations for ApproximateBacklogCount

Adds a section explaining two known scenarios where the backlog count
can be temporarily inaccurate: overcount from cancelled workflows and
reset to zero on partition unload after ~5 minutes of inactivity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Apr 27, 2026 8:21pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 6, 2026

📖 Docs PR preview links

@dustin-temporal dustin-temporal requested a review from ShahabT April 6, 2026 20:13
@dustin-temporal dustin-temporal marked this pull request as ready for review April 6, 2026 20:14
@dustin-temporal dustin-temporal requested a review from a team as a code owner April 6, 2026 20:14
Comment thread docs/cloud/metrics/openmetrics/metrics-reference.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/cloud/metrics/openmetrics/metrics-reference.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
Comment thread docs/develop/worker-performance.mdx Outdated
- Use "invalid or expired Tasks" consistently; expand to cover cancelled, terminated, completed, and timed-out Workflows/Activities (per ShahabT, dnr).
- Reverse the blocking explanation: a valid Task at the head can hold up invalid Tasks behind it; an invalid Task at the head is removed quickly (per ShahabT).
- Drop "partition" terminology; reframe as Task Queue unload (per ShahabT).
- Note that DescribeTaskQueue, UpdateTaskQueueConfig, and other Task Queue calls also keep the Task Queue loaded (per ShahabT, carlydf).
- Replace "haven't yet expired" with "until they are processed and discarded" (per dnr).
- Soften "may be temporarily inaccurate" and remove "converges to the correct value"; call out persistent sources of discrepancy such as metadata update lag and database row expirations (per dnr).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dustin-temporal
Copy link
Copy Markdown
Contributor Author

@dnr @ShahabT @carlydf at your leisure, please take another look. I believe I've now addressed all of the comments. Thanks for the help!

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.

4 participants