task_queue_partition_manager.go ×3

Frontier kind: Code frontier

unlabeled · c_9c45b93110a3

281 tests · 3583 LOC · 169 files · introduces 0 tests · 32 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges32 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
603 ranges3583 lines · 169 files · Browse complete extent
All tests (intent)
281 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: 32 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/task_queue_partition_manager.go 28 introduced LOC · 3 ranges

Open complete file

2132 targetVersion *deploymentspb.WorkerDeploymentVersion,
2133 err error,
2135 > // Note: Revision number mechanics are only involved if the dynamic config, UseRevisionNumberForWorkerVersioning, is enabled.
2136 > // Represents the revision number used by the task and is max(taskDirectiveRevisionNumber, routingConfigRevisionNumber) for the task.
2137 > var taskDispatchRevisionNumber, targetDeploymentRevisionNumber int64
2138 >
2139 > wfBehavior := directive.GetBehavior()
2140 > deployment := worker_versioning.DirectiveDeployment(directive)
2141 >
2142 > perTypeUserData, userDataChanged, err := pm.getPerTypeUserData()
2143 > if err != nil {
2144 return nil, nil, nil, 0, nil, err
2145 }
2146 > deploymentData := perTypeUserData.GetDeploymentData() task_queue_partition_manager.go
2147 > taskDirectiveRevisionNumber := directive.GetRevisionNumber()
2148 >
2149 > dbq := pm.defaultQueue()
2150 > if dbq == nil {
2151 return nil, nil, nil, 0, nil, errDefaultQueueNotInit
2152 }
2153
2154 > current, currentRevisionNumber, _, ramping, _, rampingPercentage, rampingRevisionNumber, _ := worker_versioning.CalculateTaskQueueVersioningInfo(deploymentData) task_queue_partition_manager.go
2155 > targetDeploymentVersion, targetDeploymentRevisionNumber := worker_versioning.FindTargetDeploymentVersionAndRevisionNumberForWorkflowID(
2156 > current,
2157 > currentRevisionNumber,
2158 > ramping,
2159 > rampingPercentage,
2160 > rampingRevisionNumber,
2161 > workflowId,
2162 > directive.GetUseRampingVersion(),
2163 > )
2164 > targetDeployment := worker_versioning.DeploymentFromDeploymentVersion(targetDeploymentVersion)
2165 >
2166 > if wfBehavior == enumspb.VERSIONING_BEHAVIOR_PINNED {
2167 if pm.partition.Kind() == enumspb.TASK_QUEUE_KIND_STICKY {
2168 // TODO (shahab): we can verify the passed deployment matches the last poller's deployment
go.temporal.io/server/api/taskqueue/v1/message.pb.go 4 introduced LOC · 2 ranges

Open complete file

144 }
145
146 > func (x *TaskVersionDirective) GetRevisionNumber() int64 { message.pb.go
147 > if x != nil {
148 return x.RevisionNumber
149 }
151 }
152
153 > func (x *TaskVersionDirective) GetUseRampingVersion() bool { message.pb.go
154 > if x != nil {
155 return x.UseRampingVersion
156 }