feat: add GetTaskQueueUserData RPC to admin service#9934
Open
veeral-patel wants to merge 3 commits intotemporalio:mainfrom
Open
feat: add GetTaskQueueUserData RPC to admin service#9934veeral-patel wants to merge 3 commits intotemporalio:mainfrom
veeral-patel wants to merge 3 commits intotemporalio:mainfrom
Conversation
Exposes per-type task queue user data via the admin service, proxying to the existing matching service RPC. Accepts namespace name + task queue + type + optional partition_id, resolving the partition to its wire-format RPC name for consistent-hash routing to the correct matching host. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Veeral Patel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
5 tasks
ShahabT
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds a new
GetTaskQueueUserDataRPC to the admin service.Given a namespace, task queue name, task queue type, and optional partition ID (default is 0, which is
root), it returns the user data currently loaded by that partition.This PR wraps the existing
GetTaskQueueUserDataRPC in Matching Service. We will also create atdbgcommand which calls this Admin Service RPC, in a separate PR.Why?
Each task queue family has associated metadata, stored in TaskQueueUserData. Metadata related to worker versioning, queue rate limiting, fairness are all stored in
TaskQueueUserData.TaskQueueUserData is replicated from the root partition to all other partitions.
However, there is no admin-accessible way to read the user data loaded by a specific partition or compare versions across partitions to diagnose replication lag.
Files changed
proto/internal/.../adminservice/v1/request_response.protoGetTaskQueueUserDataRequestandGetTaskQueueUserDataResponsemessagesproto/internal/.../adminservice/v1/service.protoGetTaskQueueUserDataRPC toAdminServiceservice/frontend/admin_handler.goAdminHandler.GetTaskQueueUserData: validates request, resolves namespace → ID, builds partition RPC name viatqid, calls matching service, returns per-type entry + versionservice/frontend/admin_handler_test.goHow did you test it?
Unit tests
100% unit test coverage
request == nilerrRequestNotSetnamespace == ""errNamespaceNotSettask_queuestarts with/_sys/INVALID_ARGUMENTfromtqid.NewTaskQueueFamily; matching never calledpartition_id=0, workflow typemy-queueto matching; returns correctuser_dataandversionpartition_id=1, workflow type/_sys/my-queue/1to matchingper_typemapuser_datais nil;versionstill populatedFunctional tests
Manual tests
Setup
make temporal-server && make start-sqlitetemporal operator namespace create defaulttemporal task-queue versioning insert-assignment-ruleCase 1 — Root partition, workflow type
{ "version": "1" }Case 2 — Root partition, activity type
{ "version": "1" }Case 3 — Non-root partition, workflow type
{ "version": "1" }Case 4 — Non-root partition, activity type
{ "version": "1" }Case 5 — Non-root partition, activity type, with user data
Setup: Add rate limit config
{ "userData": { "config": { "queueRateLimit": { "rateLimit": { "requestsPerSecond": 50 }, "metadata": { "reason": "manual test", "updateTime": "2026-04-13T21:40:39.888Z" } } } }, "version": "2" }Case 6 — Namespace not found
NOT_FOUNDfrom namespace registry; matching never called.