matching_engine.go ×4

Frontier kind: Code frontier

unlabeled · c_d7e6c898fc15

15 tests · 3320 LOC · 158 files · introduces 0 tests · 16 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges16 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
556 ranges3320 lines · 158 files · Browse complete extent
All tests (intent)
15 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: 16 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/matching_engine.go 16 introduced LOC · 4 ranges

Open complete file

383 return // this should only happen in unit tests
384 }
385 > ownedByOther := func(p tqid.Partition) bool { matching_engine.go
386 addr, err := rc.Route(p)
387 // don't take action on lookup error
389 }
390
391 > for range e.membershipChangedCh { matching_engine.go
392 > delay := e.config.MembershipUnloadDelay()
393 > if delay == 0 {
394 continue
395 }
396
397 > e.notifyNexusEndpointsOwnershipChange() matching_engine.go
398 >
399 > // Check all our loaded partitions to see if we lost ownership of any of them.
400 > e.partitionsLock.RLock()
401 > partitions := make([]tqid.Partition, 0, len(e.partitions))
402 > for _, pm := range e.partitions {
403 partitions = append(partitions, pm.Partition())
404 }
405 > e.partitionsLock.RUnlock() matching_engine.go
406 >
407 > partitions = util.FilterSlice(partitions, ownedByOther)
408 >
409 > const batchSize = 100
410 > for i := 0; i < len(partitions); i += batchSize {
411 // We don't own these anymore, but don't unload them immediately, wait a few seconds to ensure
412 // the membership update has propagated everywhere so that they won't get immediately re-loaded.