pri_task_reader.go ×3

Frontier kind: Code frontier

unlabeled · c_22b8323c73c5

32 tests · 5662 LOC · 194 files · introduces 0 tests · 19 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges19 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1116 ranges5662 lines · 194 files · Browse complete extent
All tests (intent)
32 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: 19 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/pri_task_reader.go 19 introduced LOC · 3 ranges

Open complete file

300 }
301
302 > if drop, retry := tr.addErrorBehavior(err); drop { pri_task_reader.go
303 task.finish(taskFinishResult{})
304 > } else if retry { pri_task_reader.go
305 > // This should only be due to persistence problems. Retry in a new goroutine
306 > // to not block other tasks, up to some concurrency limit.
307 > if tr.addRetries.Acquire(tr.backlogMgr.tqCtx, 1) != nil {
308 > return
309 > }
310 go tr.retryAddAfterError(task)
311 }
312 }
313
314 > func (tr *priTaskReader) addErrorBehavior(err error) (drop, retry bool) { pri_task_reader.go
315 > // addSpooledTask can only fail due to:
316 > // - the task queue is closed (errTaskQueueClosed or context.Canceled)
317 > // - ValidateDeployment failed (InvalidArgument)
318 > // - versioning wants to get a versioned queue and it can't be initialized
319 > // - versioning wants to re-spool the task on a different queue and that failed
320 > // - versioning says StickyWorkerUnavailable
321 > if errors.Is(err, errTaskQueueClosed) || common.IsContextCanceledErr(err) {
322 > // maybe we tried to add a task to a versioned queue as it was unloading, and have to
323 > // retry here. if tqCtx is closing, addTaskToMatcher will give up.
324 > return false, true
325 > }
326 var stickyUnavailable *serviceerrors.StickyWorkerUnavailable
327 if errors.As(err, &stickyUnavailable) {