matching_engine.go ×4

Frontier kind: Code frontier

unlabeled · c_5d9ee4c7e159

69 tests · 4507 LOC · 175 files · introduces 0 tests · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges26 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
850 ranges4507 lines · 175 files · Browse complete extent
All tests (intent)
69 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: 26 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/matching_engine.go 26 introduced LOC · 4 ranges

Open complete file

949 req *matchingservice.PollActivityTaskQueueRequest,
950 opMetrics metrics.Handler,
951 > ) (*matchingservice.PollActivityTaskQueueResponse, error) { matching_engine.go
952 > pollerID := req.GetPollerId()
953 > request := req.PollRequest
954 > taskQueueName := request.TaskQueue.GetName()
955 >
956 > // Namespace field is not populated for forwarded requests.
957 > if len(request.Namespace) == 0 {
958 ns, err := e.namespaceRegistry.GetNamespaceName(namespace.ID(req.GetNamespaceId()))
959 if err != nil {
963 }
964
965 > pollLoop: matching_engine.go
966 > for {
967 > err := common.IsValidContext(ctx)
968 > if err != nil {
969 return nil, err
970 }
971
972 > partition, err := tqid.PartitionFromProto(request.TaskQueue, req.NamespaceId, enumspb.TASK_QUEUE_TYPE_ACTIVITY) matching_engine.go
973 > if err != nil {
974 return nil, err
975 }
977 // Add frontend generated pollerID to context so taskqueueMgr can support cancellation of
978 // long-poll when frontend calls CancelOutstandingPoll API
979 > pollerCtx := context.WithValue(ctx, pollerIDKey, pollerID) matching_engine.go
980 > pollerCtx = context.WithValue(pollerCtx, identityKey, request.GetIdentity())
981 > pollMetadata := &pollMetadata{
982 > taskQueueMetadata: request.TaskQueueMetadata,
983 > workerVersionCapabilities: request.WorkerVersionCapabilities,
984 > deploymentOptions: request.DeploymentOptions,
985 > forwardedFrom: req.ForwardedSource,
986 > conditions: req.Conditions,
987 > workerInstanceKey: request.WorkerInstanceKey,
988 > workerControlTaskQueue: request.WorkerControlTaskQueue,
989 > }
990 > task, versionSetUsed, err := e.pollTask(pollerCtx, partition, pollMetadata)
991 > if err != nil {
992 if errors.Is(err, errNoTasks) {
993 return emptyPollActivityTaskQueueResponse, nil