pri_matcher.go ×6

Frontier kind: Code frontier

unlabeled · c_2a1d9d41704c

10 tests · 3505 LOC · 152 files · introduces 0 tests · 32 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges32 lines · 2 files
Tests
0 tests

Contains — complete concept membership

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

go.temporal.io/server/service/matching/pri_matcher.go 29 introduced LOC · 6 ranges

Open complete file

136 // TODO(pri): ForwarderMaxOutstandingTasks > 1 is not supported: it will cause alternating
137 // tasks to be sent to the validator, which will make the validator not validate anything.
138 > for range tm.config.ForwarderMaxOutstandingTasks() { pri_matcher.go
139 > go tm.forwardTasks(lim, retrier)
140 > }
141
142 > if normal, ok := tm.partition.(*tqid.NormalPartition); ok { // always true here, sticky has nil tm.fwdr pri_matcher.go
143 > degree := tm.config.ForwarderMaxChildrenPerNode()
144 > if parent, err := normal.ParentPartition(degree); err == nil {
145 > for range tm.config.ForwarderMaxOutstandingPolls() {
146 > go tm.forwardPolls(tm.tqCtx, 0, pollForwarderPriority, parentPollForwarder, parent)
147 > }
148 }
149 }
164
165 // TODO(pri): access to retrier is not synchronized
166 > func (tm *priTaskMatcher) forwardTasks(lim quotas.RateLimiter, retrier backoff.Retrier) { pri_matcher.go
167 > ctxs := []context.Context{tm.tqCtx}
168 > poller := waitingPoller{taskForwarderType: parentTaskForwarder}
169 > skipLimiter := false
170 > var err error
171 > for {
172 > if !skipLimiter && lim.Wait(tm.tqCtx) != nil {
173 return
174 }
175
176 > res := tm.data.EnqueuePollerAndWait(ctxs, &poller) pri_matcher.go
177 > if res.ctxErr != nil {
178 return // task queue closing
179 }
288 ft pollForwarderType,
289 target *tqid.NormalPartition,
290 > ) { pri_matcher.go
291 > policy := backoff.NewExponentialRetryPolicy(time.Second).
292 > WithMaximumInterval(tm.config.ForwardPollRetryMaxInterval()).
293 > WithExpirationInterval(backoff.NoInterval)
294 > retrier := backoff.NewRetrier(policy, clock.NewRealTimeSource())
295 > forwarderTask := newPollForwarderTask(effectivePriority, ft)
296 > ctxs := []context.Context{ctx} // ctx should be equal to or child of tm.tqCtx
297 > for ctx.Err() == nil {
298 > if ft == priorityBacklogPollForwarder && !tm.config.PriorityBacklogForwarding() {
299 // if this feature has been disabled, just wait
300 _ = util.InterruptibleSleep(ctx, time.Minute)
302 }
303
304 > res := tm.data.EnqueueTaskAndWait(ctxs, forwarderTask) pri_matcher.go
305 > if res.ctxErr != nil {
306 return // task queue closing
307 }
go.temporal.io/server/service/matching/config.go 3 introduced LOC · 1 range

Open complete file

479 return config.BacklogTaskForwardTimeout(ns.String(), taskQueueName, taskType)
480 },
481 > ForwardPollRetryMaxInterval: func() time.Duration { config.go
482 > return config.ForwardPollRetryMaxInterval(ns.String(), taskQueueName, taskType)
483 > },
484 MaxTaskDeleteBatchSize: func() int {
485 return config.MaxTaskDeleteBatchSize(ns.String(), taskQueueName, taskType)