// hasNext returns true if there are more pages to fetch
return len(p.nextPageToken) > 0
}
// length returns the number of executions in this page. For activity batch
Frontier kind: Code frontier
unlabeled · c_f8d4d854afe9
5 tests · 2343 LOC · 115 files · introduces 0 tests · 51 LOC · 1 file
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.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 51 introduced LOC across 15 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
// hasNext returns true if there are more pages to fetch
return len(p.nextPageToken) > 0
}
// length returns the number of executions in this page. For activity batch
// nextTask returns the next task to be submitted from this page
if p.submittedCount >= p.length() {
return task{} // No more tasks in this page
}
attempts: 1,
page: p,
}
if len(p.targetExecutionInfo) > 0 {
t.targetExecution = p.targetExecutionInfo[p.submittedCount]
t.executionInfo = p.executionInfos[p.submittedCount]
}
}
logger log.Logger,
hbd HeartBeatDetails,
concurrency := int(math.Max(1, float64(config.concurrency)))
taskCh := make(chan task, concurrency)
respCh := make(chan taskResponse, concurrency)
// Ticker for frequent heartbeats to avoid timeout during slow processing, 1/4 of the default heartbeat timeout (10s)
heartbeatTicker := time.NewTicker(defaultActivityHeartBeatTimeout / 4)
defer heartbeatTicker.Stop()
for range concurrency {
go startWorkerProcessor(ctx, taskCh, respCh, rateLimiter, sdkClient, a.FrontendClient, metricsHandler, logger)
}
// Initialize the first p from initial executions or fetch from query
if len(config.initialTargetExecutions) > 0 {
if isActivityBatchType(config.batchType) {
p = &page{
}
// Check if we need to fetch next page
if p.hasNext() && p.allSubmitted() {
nextPage, err := fetchPage(ctx, sdkClient, config, p.nextPageToken, p.pageNumber+1)
if err != nil {
// Disable this send case (nil channel) once the page is fully submitted, so the loop
// waits on results instead of offering empty tasks.
var nextTask task
if p.submittedCount < p.length() {
submitCh = taskCh
nextTask = p.nextTask()
}
case submitCh <- nextTask:
p.submittedCount++
resultPage := result.page
if result.err == nil {
resultPage.successCount++
} else {
resultPage.errorCount++
}
case <-heartbeatTicker.C:
// Check if we're done
break
}
}
}
// activity executions (listed via ListActivityExecutions) rather than workflow
// executions.
switch batchType {
case enumspb.BATCH_OPERATION_TYPE_TERMINATE_ACTIVITY,
enumspb.BATCH_OPERATION_TYPE_CANCEL_ACTIVITY,