context_impl.go ×3

Frontier kind: Code frontier

unlabeled · c_7f2fd909ce74

683 tests · 3159 LOC · 142 files · introduces 0 tests · 17 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges17 lines · 1 files
Tests
0 tests

Contains — complete concept membership

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

go.temporal.io/server/service/history/shard/context_impl.go 17 introduced LOC · 3 ranges

Open complete file

1469
1470 // FinishStop should only be called by the controller.
1471 > func (s *ContextImpl) FinishStop() { context_impl.go
1472 > // After this returns, engineFuture.Set may not be called anymore, so if we don't get see
1473 > // an Engine here, we won't ever have one.
1474 > _ = s.transition(contextRequestFinishStop{})
1475 >
1476 > // Use a context that we know is cancelled so that this doesn't block.
1477 > engine, _ := s.engineFuture.Get(s.lifecycleCtx)
1478 >
1479 > // Stop the engine if it was running (outside the lock but before returning).
1480 > if engine != nil {
1481 s.contextTaggedLogger.Info("", tag.LifeCycleStopping, tag.ComponentShardEngine)
1482 engine.Stop()
1485
1486 // Run finalizer to cleanup any of the shard's associated resources that are registered.
1487 > if s.finalizer != nil { context_impl.go
1488 s.finalizer.Run(s.config.ShardFinalizerTimeout())
1489 }
1628
1629 setStateStopped := func() {
1630 > s.state = contextStateStopped context_impl.go
1631 > s.contextTaggedLogger.Info("", tag.LifeCycleStopped, tag.ComponentShardContext)
1632 > // Do this again in case we skipped the stopping state, which could happen
1633 > // when calling CloseShardByID or the controller is shutting down.
1634 > s.lifecycleCancel()
1635 > }
1636
1637 switch s.state {