task_queue_partition_manager.go ×6

Frontier kind: Code frontier

unlabeled · c_9982597e7273

3 tests · 5525 LOC · 195 files · introduces 0 tests · 16 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges16 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1150 ranges5525 lines · 195 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.

1 file ranked by introduced lines: 16 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/task_queue_partition_manager.go 16 introduced LOC · 6 ranges

Open complete file

1058 }
1059 if dbq != syncMatchQueue {
1060 > // default queue should stay alive even if requests go to other queues task_queue_partition_manager.go
1061 > dbq.MarkAlive()
1062 > }
1063
1064 res, err := syncMatchQueue.DispatchQueryTask(ctx, task)
2177 // Preventing Query tasks from being dispatched to a drained version with no workers
2178 if isQuery {
2179 > if err := pm.checkQueryBlackholed(deploymentData, deployment); err != nil { task_queue_partition_manager.go
2180 return nil, nil, nil, 0, nil, err
2181 }
2417 deploymentData *persistencespb.DeploymentData,
2418 deployment *deploymentpb.Deployment,
2420 >
2421 > // Only perform this check on the root partition.
2422 > // Forwarding (polls/tasks/queries) moves “up” the partition tree, so the root is the convergence point.
2423 > // Checking non-root partitions can incorrectly conclude “no pollers” simply because the pollers are on
2424 > // a different partition and have not been forwarded here (yet), leading to false blackhole errors.
2425 > if !pm.partition.IsRoot() {
2426 return nil
2427 }
2428 // Check old format
2429 > for _, versionData := range deploymentData.GetVersions() { task_queue_partition_manager.go
2430 if versionData.GetVersion() != nil && worker_versioning.DeploymentVersionFromDeployment(deployment).Equal(versionData.GetVersion()) {
2431 if versionData.GetStatus() == enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED && len(pm.GetAllPollerInfo()) == 0 {
2437
2438 // Check new format
2439 > if workerDeploymentData, ok := deploymentData.GetDeploymentsData()[deployment.GetSeriesName()]; ok { task_queue_partition_manager.go
2440 > if workerDeploymentData.GetVersions() != nil && workerDeploymentData.GetVersions()[deployment.GetBuildId()] != nil &&
2441 > workerDeploymentData.GetVersions()[deployment.GetBuildId()].GetStatus() == enumspb.WORKER_DEPLOYMENT_VERSION_STATUS_DRAINED && len(pm.GetAllPollerInfo()) == 0 {
2442 return serviceerror.NewFailedPreconditionf(ErrBlackholedQuery, deployment.GetBuildId(), deployment.GetBuildId())
2443 }
2444 }
2445
2447 }
2448