}
if input.NamespaceListPageSize == 0 {
input.NamespaceListPageSize = 100
}
if input.TaskQueueListPageSize == 0 {
input.TaskQueueListPageSize = 100
}
}
Frontier kind: Joint frontier
unlabeled · c_66f79f997660
1 test · 2694 LOC · 124 files · introduces 1 test · 84 LOC · 3 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedgo.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsgo.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_Nilgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingEvery collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
3 files ranked by introduced lines: 84 introduced LOC across 19 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
}
if input.NamespaceListPageSize == 0 {
input.NamespaceListPageSize = 100
}
if input.TaskQueueListPageSize == 0 {
input.TaskQueueListPageSize = 100
}
}
// ScavengeBuildIds scans all task queue user data entries in all namespaces and cleans up unused build ids.
func (a *Activities) ScavengeBuildIds(ctx context.Context, input BuildIdScavangerInput) error {
scavenger.go
a.setDefaults(&input)
var heartbeat heartbeatDetails
if activity.HasHeartbeatDetails(ctx) {
if err := activity.GetHeartbeatDetails(ctx, &heartbeat); err != nil {
return temporal.NewNonRetryableApplicationError("failed to load previous heartbeat details", "TypeError", err)
}
}
rateLimiter := quotas.NewDefaultOutgoingRateLimiter(quotas.RateFn(a.buildIdScavengerVisibilityRPS))
scavenger.go
for {
nsResponse, err := a.metadataManager.ListNamespaces(ctx, &persistence.ListNamespacesRequest{
PageSize: input.NamespaceListPageSize,
NextPageToken: heartbeat.NamespaceNextPageToken,
IncludeDeleted: false, // Don't care about deleted namespaces.
})
if err != nil {
return err
}
nsId := nsResponse.Namespaces[heartbeat.NamespaceIdx].Namespace.Info.Id
if err := a.processNamespaceEntry(ctx, rateLimiter, input, &heartbeat, nsId); err != nil {
return err
}
a.recordHeartbeat(ctx, heartbeat)
}
heartbeat.NamespaceNextPageToken = nsResponse.NextPageToken
if len(heartbeat.NamespaceNextPageToken) == 0 {
break
}
}
}
heartbeat *heartbeatDetails,
nsId string,
ns, err := a.namespaceRegistry.GetNamespaceByID(namespace.ID(nsId))
if err != nil {
return err
}
// Only the active cluster for this namespace should perform the cleanup.
//nolint:forbidigo // scavenger scans entire namespace, not per workflow.
return nil
}
for {
tqResponse, err := a.taskManager.ListTaskQueueUserDataEntries(ctx, &persistence.ListTaskQueueUserDataEntriesRequest{
NamespaceID: nsId,
PageSize: input.TaskQueueListPageSize,
NextPageToken: heartbeat.TaskQueueNextPageToken,
})
if err != nil {
return err
}
entry := tqResponse.Entries[heartbeat.TaskQueueIdx]
if err := a.processUserDataEntry(ctx, rateLimiter, input, *heartbeat, ns, entry); err != nil {
if common.IsContextDeadlineExceededErr(err) {
// This is either a real DeadlineExceeded from the context, or the rate limiter
tag.Error(err))
}
a.recordHeartbeat(ctx, *heartbeat)
}
heartbeat.TaskQueueNextPageToken = tqResponse.NextPageToken
if len(heartbeat.TaskQueueNextPageToken) == 0 {
break
}
a.recordHeartbeat(ctx, *heartbeat)
}
}
ns *namespace.Namespace,
entry *persistence.TaskQueueUserDataEntry,
buildIdsToRemove, err := a.findBuildIdsToRemove(ctx, rateLimiter, input, heartbeat, ns, entry)
if err != nil {
return err
}
return nil
}
_, err = a.matchingClient.UpdateWorkerBuildIdCompatibility(ctx, &matchingservice.UpdateWorkerBuildIdCompatibilityRequest{
NamespaceId: ns.ID().String(),
TaskQueue: entry.TaskQueue,
Operation: &matchingservice.UpdateWorkerBuildIdCompatibilityRequest_RemoveBuildIds_{
RemoveBuildIds: &matchingservice.UpdateWorkerBuildIdCompatibilityRequest_RemoveBuildIds{
KnownUserDataVersion: entry.UserData.Version,
BuildIds: buildIdsToRemove,
},
},
})
return err
}
// UpdateWorkerBuildIdCompatibility mocks base method.
func (m *MockMatchingServiceClient) UpdateWorkerBuildIdCompatibility(ctx context.Context, in *matchingservice.UpdateWorkerBuildIdCompatibilityRequest, opts ...grpc.CallOption) (*matchingservice.UpdateWorkerBuildIdCompatibilityResponse, error) {
service_grpc.pb.mock.go
m.ctrl.T.Helper()
varargs := []any{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret0, _ := ret[0].(*matchingservice.UpdateWorkerBuildIdCompatibilityResponse)
ret1, _ := ret[1].(error)
return ret0, ret1
}
}
func (x *UpdateWorkerBuildIdCompatibilityRequest_RemoveBuildIds) GetBuildIds() []string {
request_response.pb.go
if x != nil {
return x.BuildIds
}
return nil
}