user_data_manager.go ×7

Frontier kind: Code frontier

unlabeled · c_c0ec6d6d55a2

50 tests · 3233 LOC · 151 files · introduces 0 tests · 15 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges15 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
528 ranges3233 lines · 151 files · Browse complete extent
All tests (intent)
50 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: 15 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/user_data_manager.go 15 introduced LOC · 7 ranges

Open complete file

466 return 0, errUserDataNoMutateNonRoot
467 }
468 > if err := m.WaitUntilInitialized(ctx); err != nil { user_data_manager.go
469 return 0, err
470 }
471 > newData, shouldReplicate, err := m.updateUserData(ctx, updateFn, options) user_data_manager.go
472 > if errors.Is(err, errUserDataUnmodified) {
473 return newData.GetVersion(), nil
474 > } else if err != nil { user_data_manager.go
475 return 0, err
476 > } else if !shouldReplicate { user_data_manager.go
477 return newData.GetVersion(), nil
478 }
514 updateFn UserDataUpdateFunc,
515 options UserDataUpdateOptions,
516 > ) (*persistencespb.VersionedTaskQueueUserData, bool, error) { user_data_manager.go
517 > m.lock.Lock()
518 > defer m.lock.Unlock()
519 >
520 > userData, _, err := m.getUserDataLocked()
521 > if err != nil {
522 return nil, false, err
523 }
524
525 > preUpdateData := userData.GetData() user_data_manager.go
526 > preUpdateVersion := userData.GetVersion()
527 > if preUpdateData == nil {
528 preUpdateData = &persistencespb.TaskQueueUserData{}
529 }
530 > if options.KnownVersion > 0 && preUpdateVersion != options.KnownVersion { user_data_manager.go
531 return nil, false, serviceerror.NewFailedPreconditionf("user data version mismatch: requested: %d, current: %d", options.KnownVersion, preUpdateVersion)
532 }