task_v2.go ×8

Frontier kind: Code frontier

unlabeled · c_132b80229a0f

23 tests · 3171 LOC · 158 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
510 ranges3171 lines · 158 files · Browse complete extent
All tests (intent)
23 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: 24 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/task_v2.go 24 introduced LOC · 8 ranges

Open complete file

99 ctx context.Context,
100 request *persistence.GetTasksRequest,
101 > ) (*persistence.InternalGetTasksResponse, error) { task_v2.go
102 > if request.InclusiveMinPass < 1 {
103 return nil, serviceerror.NewInternal("invalid GetTasks request on fair queue: InclusiveMinPass must be >= 1")
104 }
105 > if request.ExclusiveMaxTaskID != math.MaxInt64 { task_v2.go
106 // ExclusiveMaxTaskID is not supported in fair queue.
107 return nil, serviceerror.NewInternal("invalid GetTasks request on fair queue: ExclusiveMaxTaskID is not supported")
108 }
109 > nidBytes, err := primitives.ParseUUID(request.NamespaceID) task_v2.go
110 > if err != nil {
111 return nil, serviceerror.NewUnavailable(err.Error())
112 }
113
114 > inclusiveMinLevel := sqlplugin.FairLevel{ task_v2.go
115 > TaskPass: request.InclusiveMinPass,
116 > TaskID: request.InclusiveMinTaskID,
117 > }
118 > if len(request.NextPageToken) != 0 {
119 token, err := deserializePageTokenJson[matchingTaskPageToken](request.NextPageToken)
120 if err != nil {
129 }
130
131 > tqId, tqHash := taskQueueIdAndHash(nidBytes, request.TaskQueue, request.TaskType, request.Subqueue) task_v2.go
132 > rows, err := m.DB.SelectFromTasksV2(ctx, sqlplugin.TasksFilterV2{
133 > RangeHash: tqHash,
134 > TaskQueueID: tqId,
135 > InclusiveMinLevel: &inclusiveMinLevel,
136 > PageSize: &request.PageSize,
137 > })
138 > if err != nil {
139 return nil, serviceerror.NewUnavailablef("GetTasks operation failed. Failed to get rows. Error: %v", err)
140 }
141
142 > response := &persistence.InternalGetTasksResponse{ task_v2.go
143 > Tasks: make([]*commonpb.DataBlob, len(rows)),
144 > }
145 > for i, v := range rows {
146 response.Tasks[i] = persistence.NewDataBlob(v.Data, v.DataEncoding)
147 }
148 > if len(rows) == request.PageSize { task_v2.go
149 token, err := serializePageTokenJson(&matchingTaskPageToken{
150 TaskPass: rows[len(rows)-1].TaskPass,
157 }
158
159 > return response, nil task_v2.go
160 }
161