mutable_state_impl.go ×5

Frontier kind: Joint frontier

unlabeled · c_55c3734aaf87

1 test · 9879 LOC · 263 files · introduces 1 test · 36 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges36 lines · 5 files
Tests
1 test

Contains — complete concept membership

All code (extent)
2132 ranges9879 lines · 263 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.

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

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 15 introduced LOC · 5 ranges

Open complete file

3575 }
3576
3577 > func (ms *MutableStateImpl) updateBinaryChecksumSearchAttribute() error { mutable_state_impl.go
3578 > exeInfo := ms.executionInfo
3579 > resetPoints := exeInfo.AutoResetPoints.Points
3580 > // List of all recent binary checksums associated with the workflow.
3581 > recentBinaryChecksums := make([]string, 0, len(resetPoints))
3582 > for _, rp := range resetPoints {
3583 > if rp.BinaryChecksum != "" {
3584 > recentBinaryChecksums = append(recentBinaryChecksums, rp.BinaryChecksum)
3585 > }
3586 }
3587 > checksumsPayload, err := sadefs.EncodeValue(recentBinaryChecksums, enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST) mutable_state_impl.go
3588 > if err != nil {
3589 return err
3590 }
3591 > if exeInfo.SearchAttributes == nil { mutable_state_impl.go
3592 exeInfo.SearchAttributes = make(map[string]*commonpb.Payload, 1)
3593 }
3594 > if proto.Equal(exeInfo.SearchAttributes[sadefs.BinaryChecksums], checksumsPayload) { mutable_state_impl.go
3595 return nil // unchanged
3596 }
3597 > ms.updateSearchAttributes(map[string]*commonpb.Payload{sadefs.BinaryChecksums: checksumsPayload}) mutable_state_impl.go
3598 > return ms.taskGenerator.GenerateUpsertVisibilityTask()
3599 }
3600
go.temporal.io/server/common/namespace/mutate.go 11 introduced LOC · 3 ranges

Open complete file

23 // WithBadBinary adds a bad binary checksum to a Namespace during a Clone
24 // operation.
25 > func WithBadBinary(chksum string) Mutation { mutate.go
26 > return mutationFunc(
27 > func(ns *Namespace) {
28 > if ns.config.BadBinaries.Binaries == nil {
29 ns.config.BadBinaries.Binaries = make(map[string]*namespacepb.BadBinaryInfo)
30 }
31 > ns.config.BadBinaries.Binaries[chksum] = mutate.go
32 > &namespacepb.BadBinaryInfo{}
33 })
34 }
35
36 // WithID assigns the ID to a Namespace during a Clone operation.
37 > func WithID(id string) Mutation { mutate.go
38 > return mutationFunc(
39 > func(ns *Namespace) {
40 > ns.info.Id = id
41 > })
42 }
43
go.temporal.io/server/service/history/api/respondworkflowtaskcompleted/api.go 7 introduced LOC · 1 range

Open complete file

389 true)
390 } else if err := namespaceEntry.VerifyBinaryChecksum(request.GetBinaryChecksum()); err != nil { //nolint:staticcheck // SA1019 deprecated stamp will clean up later
391 > wtFailedCause = newWorkflowTaskFailedCause( api.go
392 > enumspb.WORKFLOW_TASK_FAILED_CAUSE_BAD_BINARY,
393 > serviceerror.NewInvalidArgumentf(
394 > "binary %v is marked as bad deployment",
395 > //nolint:staticcheck // SA1019 deprecated stamp will clean up later
396 > request.GetBinaryChecksum()),
397 > false)
398 } else {
399 namespace := namespaceEntry.Name()
go.temporal.io/server/common/namespace/namespace.go 2 introduced LOC · 1 range

Open complete file

153 }
154 if info, ok := badBinMap[cksum]; ok {
155 > return BadBinaryError{cksum: cksum, info: info} namespace.go
156 > }
157 return nil
158 }
go.temporal.io/server/service/history/workflow/workflow_task_state_machine.go 1 introduced LOC · 1 range

Open complete file

1429 }
1430 if addedResetPoint && len(attrs.GetBinaryChecksum()) > 0 {
1431 > if err := m.ms.updateBinaryChecksumSearchAttribute(); err != nil { workflow_task_state_machine.go
1432 return err
1433 }