fair_task_reader.go ×4

Frontier kind: Code frontier

unlabeled · c_23db2392d6b4

79 tests · 3698 LOC · 153 files · introduces 0 tests · 23 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges23 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
630 ranges3698 lines · 153 files · Browse complete extent
All tests (intent)
79 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: 23 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/fair_task_reader.go 17 introduced LOC · 4 ranges

Open complete file

296
297 // call with_out_ lock held
298 > func (tr *fairTaskReader) addTaskToMatcher(task *internalTask) { fair_task_reader.go
299 > task.resetMatcherState()
300 > err := tr.backlogMgr.addSpooledTask(task)
301 > if err == nil {
302 > return
303 > }
304
305 if drop, retry := tr.addErrorBehavior(err); drop {
403
404 for _, task := range newTasks {
405 > tr.addTaskToMatcher(task) fair_task_reader.go
406 > }
407 }
408
517 continue
518 }
519 > task := newInternalTaskFromBacklog(t, tr.completeTask) fair_task_reader.go
520 > tr.backlogMgr.setPriority(task)
521 > // After we get to this point, we must eventually call task.finish or
522 > // task.finishForwarded, which will call tr.completeTask.
523 > tr.outstandingTasks.Put(level, task)
524 > tr.loadedTasks++
525 > tr.backlogAge.record(t.Data.CreateTime, 1)
526 > internalTasks = append(internalTasks, task)
527 }
528
607 break
608 } else if _, ok := v.(*internalTask); ok {
609 > break fair_task_reader.go
610 }
611 tr.ackLevel = minLevel.(fairLevel) // nolint:revive
go.temporal.io/server/service/matching/fair_backlog_manager.go 6 introduced LOC · 2 ranges

Open complete file

269 }
270
271 > func (c *fairBacklogManagerImpl) addSpooledTask(task *internalTask) error { fair_backlog_manager.go
272 > return c.pqMgr.AddSpooledTask(task)
273 > }
274
275 func (c *fairBacklogManagerImpl) BacklogCountHint() (total int64) {
444 }
445
446 > func (c *fairBacklogManagerImpl) setPriority(task *internalTask) { fair_backlog_manager.go
447 > c.config.setDefaultPriority(task)
448 > if c.isDraining {
449 // draining goes before active backlog so we're guaranteed to finish migration
450 task.effectivePriority -= effectivePriorityFactor * maxPriorityLevels