matching_engine.go ×8

Frontier kind: Code frontier

unlabeled · c_7f221eb8d1f0

37 tests · 5423 LOC · 181 files · introduces 0 tests · 39 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges39 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1101 ranges5423 lines · 181 files · Browse complete extent
All tests (intent)
37 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.

2 files ranked by introduced lines: 39 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 35 introduced LOC · 8 ranges

Open complete file

858 }
859
860 > task.finish(taskFinishResult{consumedToken: true}) matching_engine.go
861 > e.emitTaskDispatchLatency(task, partition, req.GetNamespaceId(), request.Namespace, pollMetadata)
862 > return e.createPollWorkflowTaskQueueResponse(task, resp, opMetrics), nil
863 }
864 }
3272 recordStartResp *historyservice.RecordWorkflowTaskStartedResponse,
3273 metricsHandler metrics.Handler,
3274 > ) *matchingservice.PollWorkflowTaskQueueResponseWithRawHistory { matching_engine.go
3275 >
3276 > var serializedToken []byte
3277 > if task.isQuery() {
3278 // for a query task
3279 queryRequest := task.query.request
3284 }
3285 serializedToken, _ = e.tokenSerializer.SerializeQueryTaskToken(queryTaskToken)
3286 > } else { matching_engine.go
3287 > taskToken := tasktoken.NewWorkflowTaskToken(
3288 > task.event.Data.GetNamespaceId(),
3289 > task.event.Data.GetWorkflowId(),
3290 > task.event.Data.GetRunId(),
3291 > recordStartResp.GetScheduledEventId(),
3292 > recordStartResp.GetStartedEventId(),
3293 > recordStartResp.GetStartedTime(),
3294 > recordStartResp.GetAttempt(),
3295 > recordStartResp.GetClock(),
3296 > recordStartResp.GetVersion(),
3297 > )
3298 > serializedToken, _ = e.tokenSerializer.Serialize(taskToken)
3299 > if task.responseC == nil {
3300 ct := timestamp.TimeValue(task.event.Data.CreateTime)
3301 metrics.AsyncMatchLatencyPerTaskQueue.With(metricsHandler).Record(time.Since(ct))
3303 }
3304
3305 > response := common.CreateMatchingPollWorkflowTaskQueueResponse( matching_engine.go
3306 > recordStartResp,
3307 > task.workflowExecution(),
3308 > serializedToken)
3309 >
3310 > if task.query != nil {
3311 response.Query = task.query.request.QueryRequest.Query
3312 }
3313 > if task.backlogCountHint != nil { matching_engine.go
3314 > response.BacklogCountHint = task.backlogCountHint()
3315 > }
3316 > response.PollerScalingDecision = task.pollerScalingDecision
3317 > return response
3318 }
3319
3501 // 2. RawHistory (old path) - auto-deserialized to *History by gRPC wire compatibility
3502 // 3. History - use directly (raw history disabled)
3503 > if len(resp.RawHistoryBytes) > 0 { matching_engine.go
3504 // New path: raw bytes in field 21, pass through to frontend without processing.
3505 // Search attributes will be processed by frontend.
3506 > } else if resp.RawHistory != nil { //nolint:staticcheck matching_engine.go
3507 // Old path: history service using deprecated RawHistory field (field 20).
3508 // The gRPC client auto-deserializes repeated bytes into *History via wire compatibility.
3519 // If neither RawHistoryBytes nor RawHistory is set, resp.History should already have the data.
3520
3521 > return resp, nil matching_engine.go
3522 }
3523
go.temporal.io/server/service/matching/physical_task_queue_manager.go 4 introduced LOC · 2 ranges

Open complete file