executable_task.go ×5

Frontier kind: Code frontier

unlabeled · c_9a6e603ace4d

3 tests · 3267 LOC · 150 files · introduces 0 tests · 31 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges31 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
452 ranges3267 lines · 150 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

go.temporal.io/server/service/history/replication/executable_task.go 28 introduced LOC · 5 ranges

Open complete file

215 func (e *ExecutableTaskImpl) Abort() {
216 if atomic.LoadInt32(&e.taskState) != taskStatePending {
217 > return executable_task.go
218 > }
219 if !atomic.CompareAndSwapInt32(&e.taskState, taskStatePending, taskStateAborted) {
220 e.Abort() // retry abort
350 func (e *ExecutableTaskImpl) emitFinishMetrics(
351 now time.Time,
352 > ) { executable_task.go
353 > if e.isDuplicated {
354 namespaceID, _, _ := e.workflowKeyFromTask()
355 metrics.ReplicationDuplicatedTaskCount.With(e.MetricsHandler).Record(1,
358 return
359 }
360 > nsTag := metrics.NamespaceUnknownTag() executable_task.go
361 > item := e.namespace.Load()
362 > if item != nil {
363 nsTag = metrics.NamespaceTag(item.(namespace.Name).String())
364 }
365
366 // Only emit queue/processing latency metrics if execution actually started
367 > if !e.taskExecuteStartTime.IsZero() { executable_task.go
368 // Queue latency: time from task creation to execution start
369 queueLatency := e.taskExecuteStartTime.Sub(e.taskReceivedTime)
401 }
402
403 > replicationLatency := now.Sub(e.taskCreationTime) executable_task.go
404 > metrics.ReplicationLatency.With(e.MetricsHandler).Record(
405 > replicationLatency,
406 > metrics.OperationTag(e.metricsTag),
407 > nsTag,
408 > metrics.SourceClusterTag(e.sourceClusterName),
409 > )
410 > metrics.ReplicationTaskTransmissionLatency.With(e.MetricsHandler).Record(
411 > e.taskReceivedTime.Sub(e.taskCreationTime),
412 > metrics.OperationTag(e.metricsTag),
413 > nsTag,
414 > metrics.SourceClusterTag(e.sourceClusterName),
415 > )
416 >
417 > // Emit task attempt count
418 > metrics.ReplicationTasksAttempt.With(e.MetricsHandler).Record(
419 > int64(e.Attempt()),
420 > metrics.OperationTag(e.metricsTag),
421 > nsTag,
422 > )
423 }
424
go.temporal.io/server/common/metrics/tags.go 3 introduced LOC · 2 ranges

Open complete file

144
145 // SourceClusterTag returns a new source cluster tag.
146 > func SourceClusterTag(value string) Tag { tags.go
147 > if len(value) == 0 {
148 value = unknownValue
149 }
150 > return Tag{Key: sourceCluster, Value: value} tags.go
151 }
152