execution_tasks.go ×11

Frontier kind: Code frontier

unlabeled · c_733d057f0648

90 tests · 3431 LOC · 160 files · introduces 0 tests · 56 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges56 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
568 ranges3431 lines · 160 files · Browse complete extent
All tests (intent)
90 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.

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

go.temporal.io/server/common/persistence/sql/execution_tasks.go 56 introduced LOC · 11 ranges

Open complete file

67 ctx context.Context,
68 request *p.RangeCompleteHistoryTasksRequest,
69 > ) error { execution_tasks.go
70 > switch request.TaskCategory.Type() {
71 > case tasks.CategoryTypeImmediate:
72 > return m.rangeCompleteHistoryImmediateTasks(ctx, request)
73 > case tasks.CategoryTypeScheduled:
74 > return m.rangeCompleteHistoryScheduledTasks(ctx, request)
75 default:
76 return serviceerror.NewInternalf("Unknown task category type: %v", request.TaskCategory)
169 ctx context.Context,
170 request *p.RangeCompleteHistoryTasksRequest,
171 > ) error { execution_tasks.go
172 > // This is for backward compatiblity.
173 > // These task categories exist before the general history_immediate_tasks table is created,
174 > // so they have their own tables.
175 > categoryID := request.TaskCategory.ID()
176 > switch categoryID {
177 > case tasks.CategoryIDTransfer:
178 > return m.rangeCompleteTransferTasks(ctx, request)
179 > case tasks.CategoryIDVisibility:
180 > return m.rangeCompleteVisibilityTasks(ctx, request)
181 > case tasks.CategoryIDReplication:
182 > return m.rangeCompleteReplicationTasks(ctx, request)
183 }
184
281 ctx context.Context,
282 request *p.RangeCompleteHistoryTasksRequest,
283 > ) error { execution_tasks.go
284 > // This is for backward compatiblity.
285 > // These task categories exist before the general history_scheduled_tasks table is created,
286 > // so they have their own tables.
287 > categoryID := request.TaskCategory.ID()
288 > if categoryID == tasks.CategoryIDTimer {
289 > return m.rangeCompleteTimerTasks(ctx, request)
290 > }
291
292 start := request.InclusiveMinTaskKey.FireTime
362 ctx context.Context,
363 request *p.RangeCompleteHistoryTasksRequest,
364 > ) error { execution_tasks.go
365 > if _, err := m.DB.RangeDeleteFromTransferTasks(ctx, sqlplugin.TransferTasksRangeFilter{
366 > ShardID: request.ShardID,
367 > InclusiveMinTaskID: request.InclusiveMinTaskKey.TaskID,
368 > ExclusiveMaxTaskID: request.ExclusiveMaxTaskKey.TaskID,
369 > }); err != nil {
370 return serviceerror.NewUnavailablef("RangeCompleteTransferTask operation failed. Error: %v", err)
371 }
372 > return nil execution_tasks.go
373 }
374
436 ctx context.Context,
437 request *p.RangeCompleteHistoryTasksRequest,
438 > ) error { execution_tasks.go
439 > start := request.InclusiveMinTaskKey.FireTime
440 > end := request.ExclusiveMaxTaskKey.FireTime
441 > if _, err := m.DB.RangeDeleteFromTimerTasks(ctx, sqlplugin.TimerTasksRangeFilter{
442 > ShardID: request.ShardID,
443 > InclusiveMinVisibilityTimestamp: start,
444 > ExclusiveMaxVisibilityTimestamp: end,
445 > }); err != nil {
446 return serviceerror.NewUnavailablef("RangeCompleteTimerTask operation failed. Error: %v", err)
447 }
448 > return nil execution_tasks.go
449 }
450
574 ctx context.Context,
575 request *p.RangeCompleteHistoryTasksRequest,
576 > ) error { execution_tasks.go
577 > if _, err := m.DB.RangeDeleteFromReplicationTasks(ctx, sqlplugin.ReplicationTasksRangeFilter{
578 > ShardID: request.ShardID,
579 > InclusiveMinTaskID: request.InclusiveMinTaskKey.TaskID,
580 > ExclusiveMaxTaskID: request.ExclusiveMaxTaskKey.TaskID,
581 > }); err != nil {
582 return serviceerror.NewUnavailablef("RangeCompleteReplicationTask operation failed. Error: %v", err)
583 }
584 > return nil execution_tasks.go
585 }
586
749 ctx context.Context,
750 request *p.RangeCompleteHistoryTasksRequest,
751 > ) error { execution_tasks.go
752 > if _, err := m.DB.RangeDeleteFromVisibilityTasks(ctx, sqlplugin.VisibilityTasksRangeFilter{
753 > ShardID: request.ShardID,
754 > InclusiveMinTaskID: request.InclusiveMinTaskKey.TaskID,
755 > ExclusiveMaxTaskID: request.ExclusiveMaxTaskKey.TaskID,
756 > }); err != nil {
757 return serviceerror.NewUnavailablef("RangeCompleteVisibilityTask operation failed. Error: %v", err)
758 }
759 > return nil execution_tasks.go
760 }
761