task_processor_manager.go ×2

Frontier kind: Joint frontier

unlabeled · c_344d32c700e9

1 test · 3486 LOC · 156 files · introduces 1 test · 38 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges38 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
491 ranges3486 lines · 156 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

3 files ranked by introduced lines: 38 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/replication/task_processor_manager.go 29 introduced LOC · 2 ranges

Open complete file

272 minAckedTaskID = min(minAckedTaskID, 0)
273 } else {
274 > minAckedTaskID = min(minAckedTaskID, readerState.Scopes[0].Range.InclusiveMin.TaskId-1) task_processor_manager.go
275 > }
276 }
277
280 }
281
282 > r.logger.Debug("cleaning up replication task queue", tag.ReadLevel(minAckedTaskID)) task_processor_manager.go
283 > metrics.ReplicationTaskCleanupCount.With(r.metricsHandler).Record(
284 > 1,
285 > metrics.OperationTag(metrics.ReplicationTaskCleanupScope),
286 > )
287 > metrics.ReplicationTasksLag.With(r.metricsHandler).Record(
288 > r.shard.GetQueueExclusiveHighReadWatermark(tasks.CategoryReplication).Prev().TaskID-minAckedTaskID,
289 > metrics.TargetClusterTag(currentClusterName),
290 > metrics.OperationTag(metrics.ReplicationTaskCleanupScope),
291 > )
292 >
293 > ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
294 > ctx = headers.SetCallerInfo(ctx, headers.SystemPreemptableCallerInfo)
295 > defer cancel()
296 >
297 > err := r.shard.GetExecutionManager().RangeCompleteHistoryTasks(
298 > ctx,
299 > &persistence.RangeCompleteHistoryTasksRequest{
300 > ShardID: r.shard.GetShardID(),
301 > TaskCategory: tasks.CategoryReplication,
302 > ExclusiveMaxTaskKey: tasks.NewImmediateKey(minAckedTaskID + 1),
303 > },
304 > )
305 > if err == nil {
306 > r.minTxAckedTaskID = minAckedTaskID
307 > }
308 > return err
309 }
310
go.temporal.io/server/service/history/interfaces/shard_context_mock.go 6 introduced LOC · 1 range

Open complete file

415
416 // GetExecutionManager mocks base method.
417 > func (m *MockShardContext) GetExecutionManager() persistence0.ExecutionManager { shard_context_mock.go
418 > m.ctrl.T.Helper()
419 > ret := m.ctrl.Call(m, "GetExecutionManager")
420 > ret0, _ := ret[0].(persistence0.ExecutionManager)
421 > return ret0
422 > }
423
424 // GetExecutionManager indicates an expected call of GetExecutionManager.
go.temporal.io/server/common/log/tag/tags.go 3 introduced LOC · 1 range

Open complete file

583
584 // ReadLevel returns tag for ReadLevel
585 > func ReadLevel(lv int64) ZapTag { tags.go
586 > return NewInt64("read-level", lv)
587 > }
588
589 // MinLevel returns tag for MinLevel