execution_util.go ×18

Frontier kind: Code frontier

unlabeled · c_93332b428339

60 tests · 5329 LOC · 174 files · introduces 0 tests · 197 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
32 ranges197 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1040 ranges5329 lines · 174 files · Browse complete extent
All tests (intent)
60 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.

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

go.temporal.io/server/common/persistence/sql/execution_util.go 135 introduced LOC · 18 ranges

Open complete file

228 }
229
230 > if err := m.updateExecution(ctx, execution_util.go
231 > tx,
232 > namespaceID,
233 > workflowID,
234 > workflowSnapshot.ExecutionInfoBlob,
235 > workflowSnapshot.ExecutionState,
236 > workflowSnapshot.NextEventID,
237 > lastWriteVersion,
238 > workflowSnapshot.DBRecordVersion,
239 > shardID,
240 > ); err != nil {
241 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to update executions row. Erorr: %v", err)
242 }
243
244 > if err := applyTasks(ctx, execution_util.go
245 > tx,
246 > shardID,
247 > workflowSnapshot.Tasks,
248 > ); err != nil {
249 return err
250 }
251
252 > if err := deleteActivityInfoMap(ctx, execution_util.go
253 > tx,
254 > shardID,
255 > namespaceIDBytes,
256 > workflowID,
257 > runIDBytes,
258 > ); err != nil {
259 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear activity info map. Error: %v", err)
260 }
261
262 > if err := updateActivityInfos(ctx, execution_util.go
263 > tx,
264 > workflowSnapshot.ActivityInfos,
265 > nil,
266 > shardID,
267 > namespaceIDBytes,
268 > workflowID,
269 > runIDBytes,
270 > ); err != nil {
271 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into activity info map after clearing. Error: %v", err)
272 }
273
274 > if err := deleteTimerInfoMap(ctx, execution_util.go
275 > tx,
276 > shardID,
277 > namespaceIDBytes,
278 > workflowID,
279 > runIDBytes,
280 > ); err != nil {
281 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear timer info map. Error: %v", err)
282 }
283
284 > if err := updateTimerInfos(ctx, execution_util.go
285 > tx,
286 > workflowSnapshot.TimerInfos,
287 > nil,
288 > shardID,
289 > namespaceIDBytes,
290 > workflowID,
291 > runIDBytes,
292 > ); err != nil {
293 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into timer info map after clearing. Error: %v", err)
294 }
295
296 > if err := deleteChildExecutionInfoMap(ctx, execution_util.go
297 > tx,
298 > shardID,
299 > namespaceIDBytes,
300 > workflowID,
301 > runIDBytes,
302 > ); err != nil {
303 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear child execution info map. Error: %v", err)
304 }
305
306 > if err := updateChildExecutionInfos(ctx, execution_util.go
307 > tx,
308 > workflowSnapshot.ChildExecutionInfos,
309 > nil,
310 > shardID,
311 > namespaceIDBytes,
312 > workflowID,
313 > runIDBytes,
314 > ); err != nil {
315 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into activity info map after clearing. Error: %v", err)
316 }
317
318 > if err := deleteRequestCancelInfoMap(ctx, execution_util.go
319 > tx,
320 > shardID,
321 > namespaceIDBytes,
322 > workflowID,
323 > runIDBytes,
324 > ); err != nil {
325 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear request cancel info map. Error: %v", err)
326 }
327
328 > if err := updateRequestCancelInfos(ctx, execution_util.go
329 > tx,
330 > workflowSnapshot.RequestCancelInfos,
331 > nil,
332 > shardID,
333 > namespaceIDBytes,
334 > workflowID,
335 > runIDBytes,
336 > ); err != nil {
337 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into request cancel info map after clearing. Error: %v", err)
338 }
339
340 > if err := deleteSignalInfoMap(ctx, execution_util.go
341 > tx,
342 > shardID,
343 > namespaceIDBytes,
344 > workflowID,
345 > runIDBytes,
346 > ); err != nil {
347 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear signal info map. Error: %v", err)
348 }
349
350 > if err := updateSignalInfos(ctx, execution_util.go
351 > tx,
352 > workflowSnapshot.SignalInfos,
353 > nil,
354 > shardID,
355 > namespaceIDBytes,
356 > workflowID,
357 > runIDBytes,
358 > ); err != nil {
359 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into signal info map after clearing. Error: %v", err)
360 }
361
362 > if err := deleteSignalsRequestedSet(ctx, execution_util.go
363 > tx,
364 > shardID,
365 > namespaceIDBytes,
366 > workflowID,
367 > runIDBytes); err != nil {
368 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear signals requested set. Error: %v", err)
369 }
370
371 > if err := updateSignalsRequested(ctx, execution_util.go
372 > tx,
373 > workflowSnapshot.SignalRequestedIDs,
374 > nil,
375 > shardID,
376 > namespaceIDBytes,
377 > workflowID,
378 > runIDBytes,
379 > ); err != nil {
380 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to insert into signals requested set after clearing. Error: %v", err)
381 }
382
383 > if err := deleteBufferedEvents(ctx, execution_util.go
384 > tx,
385 > shardID,
386 > namespaceIDBytes,
387 > workflowID,
388 > runIDBytes,
389 > ); err != nil {
390 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear buffered events. Error: %v", err)
391 }
392
393 > if err := deleteChasmNodeMap(ctx, execution_util.go
394 > tx,
395 > shardID,
396 > namespaceIDBytes,
397 > workflowID,
398 > runIDBytes,
399 > ); err != nil {
400 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to clear CHASM nodes. Error: %v", err)
401 }
402
403 > if err := updateChasmNodes(ctx, execution_util.go
404 > tx,
405 > workflowSnapshot.ChasmNodes,
406 > nil,
407 > shardID,
408 > namespaceIDBytes,
409 > workflowID,
410 > runIDBytes,
411 > ); err != nil {
412 return serviceerror.NewUnavailablef("applyWorkflowSnapshotTxAsReset failed. Failed to update CHASM nodes. Error: %v", err)
413 }
414
415 > return nil execution_util.go
416 }
417
go.temporal.io/server/common/persistence/sql/execution_state_map.go 53 introduced LOC · 12 ranges

Open complete file

92 workflowID string,
93 runID primitives.UUID,
94 > ) error { execution_state_map.go
95 >
96 > if _, err := tx.DeleteAllFromActivityInfoMaps(ctx, sqlplugin.ActivityInfoMapsAllFilter{
97 > ShardID: shardID,
98 > NamespaceID: namespaceID,
99 > WorkflowID: workflowID,
100 > RunID: runID,
101 > }); err != nil {
102 return serviceerror.NewUnavailablef("Failed to delete activity info map. Error: %v", err)
103 }
104 > return nil execution_state_map.go
105 }
106
181 workflowID string,
182 runID primitives.UUID,
183 > ) error { execution_state_map.go
184 >
185 > if _, err := tx.DeleteAllFromTimerInfoMaps(ctx, sqlplugin.TimerInfoMapsAllFilter{
186 > ShardID: shardID,
187 > NamespaceID: namespaceID,
188 > WorkflowID: workflowID,
189 > RunID: runID,
190 > }); err != nil {
191 return serviceerror.NewUnavailablef("Failed to delete timer info map. Error: %v", err)
192 }
193 > return nil execution_state_map.go
194 }
195
271 workflowID string,
272 runID primitives.UUID,
273 > ) error { execution_state_map.go
274 >
275 > if _, err := tx.DeleteAllFromChildExecutionInfoMaps(ctx, sqlplugin.ChildExecutionInfoMapsAllFilter{
276 > ShardID: shardID,
277 > NamespaceID: namespaceID,
278 > WorkflowID: workflowID,
279 > RunID: runID,
280 > }); err != nil {
281 return serviceerror.NewUnavailablef("Failed to delete timer info map. Error: %v", err)
282 }
283 > return nil execution_state_map.go
284 }
285
362 workflowID string,
363 runID primitives.UUID,
364 > ) error { execution_state_map.go
365 >
366 > if _, err := tx.DeleteAllFromRequestCancelInfoMaps(ctx, sqlplugin.RequestCancelInfoMapsAllFilter{
367 > ShardID: shardID,
368 > NamespaceID: namespaceID,
369 > WorkflowID: workflowID,
370 > RunID: runID,
371 > }); err != nil {
372 return serviceerror.NewUnavailablef("Failed to delete request cancel info map. Error: %v", err)
373 }
374 > return nil execution_state_map.go
375 }
376
453 workflowID string,
454 runID primitives.UUID,
455 > ) error { execution_state_map.go
456 >
457 > if _, err := tx.DeleteAllFromSignalInfoMaps(ctx, sqlplugin.SignalInfoMapsAllFilter{
458 > ShardID: shardID,
459 > NamespaceID: namespaceID,
460 > WorkflowID: workflowID,
461 > RunID: runID,
462 > }); err != nil {
463 return serviceerror.NewUnavailablef("Failed to delete signal info map. Error: %v", err)
464 }
465 > return nil execution_state_map.go
466 }
467
550 workflowID string,
551 runID primitives.UUID,
552 > ) error { execution_state_map.go
553 > if _, err := tx.DeleteAllFromChasmNodeMaps(ctx, sqlplugin.ChasmNodeMapsAllFilter{
554 > ShardID: shardID,
555 > NamespaceID: namespaceID,
556 > WorkflowID: workflowID,
557 > RunID: runID,
558 > }); err != nil {
559 return serviceerror.NewUnavailablef("Failed to delete CHASM node map. Error: %v", err)
560 }
561 > return nil execution_state_map.go
562 }
go.temporal.io/server/common/persistence/sql/execution_state_non_map.go 9 introduced LOC · 2 ranges

Open complete file

86 workflowID string,
87 runID primitives.UUID,
89 >
90 > if _, err := tx.DeleteAllFromSignalsRequestedSets(ctx, sqlplugin.SignalsRequestedSetsAllFilter{
91 > ShardID: shardID,
92 > NamespaceID: namespaceID,
93 > WorkflowID: workflowID,
94 > RunID: runID,
95 > }); err != nil {
96 return serviceerror.NewUnavailablef("Failed to delete signals requested set. Error: %v", err)
97 }
98 > return nil execution_state_non_map.go
99 }
100