matching_engine.go ×6

Frontier kind: Code frontier

unlabeled · c_cac7fa772bfb

3 tests · 5526 LOC · 191 files · introduces 0 tests · 41 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges41 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1126 ranges5526 lines · 191 files · Browse complete extent
All tests (intent)
3 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: 41 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/matching_engine.go 25 introduced LOC · 6 ranges

Open complete file

3779 ctx context.Context,
3780 req *matchingservice.UpdateFairnessStateRequest,
3781 > ) (*matchingservice.UpdateFairnessStateResponse, error) { matching_engine.go
3782 > partition, err := tqid.NormalPartitionFromRpcName(req.GetTaskQueue(), req.GetNamespaceId(), enumspb.TASK_QUEUE_TYPE_WORKFLOW)
3783 > if err != nil {
3784 return nil, err
3785 }
3786
3787 > pm, _, err := e.getTaskQueuePartitionManager(ctx, partition, true, loadCauseOtherWrite) matching_engine.go
3788 > if err != nil {
3789 return nil, err
3790 }
3791
3792 > updateFn := func(old *persistencespb.TaskQueueUserData) (*persistencespb.TaskQueueUserData, bool, error) { matching_engine.go
3793 > data := old
3794 > if data != nil {
3795 data = common.CloneProto(old)
3796 > } else { matching_engine.go
3797 > data = &persistencespb.TaskQueueUserData{}
3798 > }
3799 > if data.PerType == nil {
3800 > data.PerType = make(map[int32]*persistencespb.TaskQueueTypeUserData)
3801 > }
3802 > typ := int32(req.GetTaskQueueType())
3803 > perType := data.PerType[typ]
3804 > if perType == nil {
3805 > data.PerType[typ] = &persistencespb.TaskQueueTypeUserData{}
3806 > perType = data.PerType[typ]
3807 > }
3808 > perType.FairnessState = req.FairnessState
3809 > return data, true, nil
3810 }
3811 > _, err = pm.GetUserDataManager().UpdateUserData(ctx, UserDataUpdateOptions{Source: "Matching auto enable"}, updateFn) matching_engine.go
3812 > if err != nil {
3813 return nil, err
3814 }
3815 > return &matchingservice.UpdateFairnessStateResponse{}, nil matching_engine.go
3816 }
3817
go.temporal.io/server/api/matchingservice/v1/request_response.pb.go 12 introduced LOC · 3 ranges

Open complete file

5465 }
5466
5467 > func (x *UpdateFairnessStateRequest) GetNamespaceId() string { request_response.pb.go
5468 > if x != nil {
5469 > return x.NamespaceId
5470 > }
5471 return ""
5472 }
5473
5474 > func (x *UpdateFairnessStateRequest) GetTaskQueue() string { request_response.pb.go
5475 > if x != nil {
5476 > return x.TaskQueue
5477 > }
5478 return ""
5479 }
5480
5481 > func (x *UpdateFairnessStateRequest) GetTaskQueueType() v19.TaskQueueType { request_response.pb.go
5482 > if x != nil {
5483 > return x.TaskQueueType
5484 > }
5485 return v19.TaskQueueType(0)
5486 }
go.temporal.io/server/service/matching/task_queue_partition_manager.go 4 introduced LOC · 1 range

Open complete file

2470 taskType := int32(pm.Partition().TaskType())
2471 if to.GetData().GetPerType()[taskType].GetFairnessState() != pm.fairnessState {
2472 > pm.logger.Debug("unloading partitionManager due to change in FairnessState") task_queue_partition_manager.go
2473 > pm.unloadFromEngine(unloadCauseConfigChange)
2474 > return
2475 > }
2476
2477 // Notify all queues so they can re-evaluate their backlog.