execution_mutable_state_task.go ×3

Frontier kind: Code frontier

unlabeled · c_12a5bccc1d35

105 tests · 3240 LOC · 155 files · introduces 0 tests · 75 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges75 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
520 ranges3240 lines · 155 files · Browse complete extent
All tests (intent)
105 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: 75 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/tests/execution_mutable_state_task.go 68 introduced LOC · 3 ranges

Open complete file

62 serializer serialization.Serializer,
63 logger log.Logger,
64 > ) *ExecutionMutableStateTaskSuite { execution_mutable_state_task.go
65 > testSer := &testSerializer{Serializer: serializer}
66 > return &ExecutionMutableStateTaskSuite{
67 > Assertions: require.New(t),
68 > ShardManager: p.NewShardManager(
69 > shardStore,
70 > testSer,
71 > ),
72 > ExecutionManager: p.NewExecutionManager(
73 > executionStore,
74 > testSer,
75 > nil,
76 > logger,
77 > dynamicconfig.GetIntPropertyFn(4*1024*1024),
78 > dynamicconfig.GetBoolPropertyFn(false),
79 > ),
80 > Logger: logger,
81 > }
82 > }
83
84 > func (s *ExecutionMutableStateTaskSuite) SetupTest() { execution_mutable_state_task.go
85 > s.Assertions = require.New(s.T())
86 > s.Ctx, s.Cancel = context.WithTimeout(context.Background(), 30*time.Second*debug.TimeoutMultiplier)
87 >
88 > s.ShardID++
89 > resp, err := s.ShardManager.GetOrCreateShard(s.Ctx, &p.GetOrCreateShardRequest{
90 > ShardID: s.ShardID,
91 > InitialShardInfo: &persistencespb.ShardInfo{
92 > ShardId: s.ShardID,
93 > RangeId: 1,
94 > Owner: "test-shard-owner",
95 > },
96 > })
97 > s.NoError(err)
98 > previousRangeID := resp.ShardInfo.RangeId
99 > resp.ShardInfo.RangeId++
100 > err = s.ShardManager.UpdateShard(s.Ctx, &p.UpdateShardRequest{
101 > ShardInfo: resp.ShardInfo,
102 > PreviousRangeID: previousRangeID,
103 > })
104 > s.NoError(err)
105 > s.RangeID = resp.ShardInfo.RangeId
106 > s.Owner = resp.ShardInfo.Owner
107 >
108 > s.WorkflowKey = definition.NewWorkflowKey(
109 > uuid.New().String(),
110 > uuid.New().String(),
111 > uuid.New().String(),
112 > )
113 > }
114
115 > func (s *ExecutionMutableStateTaskSuite) TearDownTest() { execution_mutable_state_task.go
116 > for _, category := range []tasks.Category{tasks.CategoryTransfer, tasks.CategoryReplication, tasks.CategoryVisibility} {
117 > err := s.ExecutionManager.RangeCompleteHistoryTasks(s.Ctx, &p.RangeCompleteHistoryTasksRequest{
118 > ShardID: s.ShardID,
119 > TaskCategory: category,
120 > InclusiveMinTaskKey: tasks.NewImmediateKey(0),
121 > ExclusiveMaxTaskKey: tasks.NewImmediateKey(math.MaxInt64),
122 > })
123 > s.NoError(err)
124 > }
125 > err := s.ExecutionManager.RangeCompleteHistoryTasks(s.Ctx, &p.RangeCompleteHistoryTasksRequest{
126 > ShardID: s.ShardID,
127 > TaskCategory: tasks.CategoryTimer,
128 > InclusiveMinTaskKey: tasks.NewKey(time.Unix(0, 0), 0),
129 > ExclusiveMaxTaskKey: tasks.NewKey(time.Unix(0, math.MaxInt64), 0),
130 > })
131 > s.NoError(err)
132 >
133 > s.Cancel()
134 }
135
go.temporal.io/server/common/persistence/execution_manager.go 7 introduced LOC · 2 ranges

Open complete file

1005 ctx context.Context,
1006 request *RangeCompleteHistoryTasksRequest,
1007 > ) error { execution_manager.go
1008 > if err := validateTaskRange(
1009 > request.TaskCategory.Type(),
1010 > request.InclusiveMinTaskKey,
1011 > request.ExclusiveMaxTaskKey,
1012 > ); err != nil {
1013 return err
1014 }
1015
1016 > return m.persistence.RangeCompleteHistoryTasks(ctx, request) execution_manager.go
1017 }
1018