task_processor.go ×2

Frontier kind: Joint frontier

unlabeled · c_6674e6c496fa

3 tests · 4401 LOC · 194 files · introduces 3 tests · 31 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
2 ranges31 lines · 1 files
Tests
3 tests

Contains — complete concept membership

All code (extent)
659 ranges4401 lines · 194 files · Browse complete extent
All tests (intent)
3 testsBrowse complete intent

Neighbourhood graph

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.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

3 tests introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 31 introduced LOC across 2 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/replication/task_processor.go 31 introduced LOC · 2 ranges

Open complete file

348 ctx context.Context,
349 request *persistence.PutReplicationTaskToDLQRequest,
350 > ) error { task_processor.go
351 > _ = p.rateLimiter.Wait(ctx)
352 >
353 > // Route the DLQ entry to the shard that owns the workflow on this (target) cluster,
354 > // not the processor's shard. In cross-shard replication (source shard count < target
355 > // shard count), the processor shard does not always equal the owner shard. Using
356 > // p.config.GetShardID matches what handler.GetDLQReplicationMessages uses to dispatch,
357 > // so the operator-facing "DLQ for workflow W is at GetShardID(W)" model holds.
358 > targetShardID := p.config.GetShardID(
359 > namespace.ID(request.TaskInfo.GetNamespaceId()),
360 > request.TaskInfo.GetWorkflowId(),
361 > )
362 >
363 > p.logger.Info("enqueue replication task to DLQ",
364 > tag.TargetShardID(targetShardID),
365 > tag.SourceShardID(p.sourceShardID),
366 > tag.WorkflowNamespaceID(request.TaskInfo.GetNamespaceId()),
367 > tag.WorkflowID(request.TaskInfo.GetWorkflowId()),
368 > tag.WorkflowRunID(request.TaskInfo.GetRunId()),
369 > tag.TaskID(request.TaskInfo.GetTaskId()),
370 > )
371 > metrics.ReplicationDLQMaxLevelGauge.With(p.metricsHandler).Record(
372 > float64(request.TaskInfo.GetTaskId()),
373 > metrics.OperationTag(metrics.ReplicationDLQStatsScope),
374 > metrics.TargetClusterTag(p.sourceCluster),
375 > metrics.InstanceTag(convert.Int32ToString(targetShardID)))
376 > // The following is guaranteed to success or retry forever until processor is shutdown.
377 > return backoff.ThrottleRetry(func() error {
378 > err := writeTaskToDLQ(ctx, p.dlqWriter, p.sourceShardID, request.SourceClusterName, targetShardID, request.TaskInfo)
379 > if err != nil {
380 p.logger.Error("failed to enqueue replication task to DLQ", tag.Error(err))
381 metrics.ReplicationDLQFailed.With(p.metricsHandler).Record(
384 )
385 }
386 > return err task_processor.go
387 }, p.dlqRetryPolicy, p.isRetryableError)
388 }