fair_task_reader.go ×3

Frontier kind: Code frontier

unlabeled · c_97238364de9b

31 tests · 6017 LOC · 198 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)
1221 ranges6017 lines · 198 files · Browse complete extent
All tests (intent)
31 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/fair_task_reader.go 19 introduced LOC · 3 ranges

Open complete file

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