fair_task_reader.go ×2

Frontier kind: Code frontier

unlabeled · c_59cbb6f7fcee

8 tests · 7735 LOC · 206 files · introduces 0 tests · 17 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges17 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1703 ranges7735 lines · 206 files · Browse complete extent
All tests (intent)
8 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: 17 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/fair_backlog_manager.go 13 introduced LOC · 1 range

Open complete file

365 }
366
367 > func (c *fairBacklogManagerImpl) respoolTaskAfterError(task *persistencespb.TaskInfo) error { fair_backlog_manager.go
368 > // We cannot just remove it from persistence because then it will be lost.
369 > // We handle this by writing the task back to persistence with a higher taskID.
370 > // This will allow subsequent tasks to make progress, and hopefully by the time this task is picked-up
371 > // again the underlying reason for failing to start will be resolved.
372 > // Note the task may get written to a different subqueue than it came from.
373 > metrics.TaskRewrites.With(c.metricsHandler).Record(1)
374 > err := backoff.ThrottleRetryContext(c.tqCtx, func(context.Context) error {
375 > return c.SpoolTask(task)
376 > }, persistenceOperationRetryPolicy, common.IsPersistenceTransientError)
377 > if err == nil {
378 > return nil
379 > }
380
381 // OK, we also failed to write to persistence.
go.temporal.io/server/service/matching/fair_task_reader.go 4 introduced LOC · 2 ranges

Open complete file

177
178 // On other errors: ask backlog manager to re-spool to persistence
179 > if tr.backlogMgr.respoolTaskAfterError(task.event.Data) != nil { fair_task_reader.go
180 return // task queue will unload now
181 }
182
183 // If we re-spooled successfully, remove the old version of the task.
184 > tr.lock.Lock() fair_task_reader.go
185 > defer tr.lock.Unlock()
186 > tr.completeTaskLocked(task)
187 }
188