context_impl.go ×3

Frontier kind: Code frontier

unlabeled · c_2773c2bdc2a5

33 tests · 3391 LOC · 145 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)
480 ranges3391 lines · 145 files · Browse complete extent
All tests (intent)
33 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

1193
1194 // Range is successfully updated in cassandra now update shard context to reflect new range
1195 > s.contextTaggedLogger.Info("Range updated for shardID", context_impl.go
1196 > tag.ShardRangeID(updatedShardInfo.RangeId),
1197 > tag.PreviousShardRangeID(s.shardInfo.RangeId),
1198 > )
1199 >
1200 > s.shardInfo = trimShardInfo(s.config, s.clusterMetadata.GetAllClusterInfo(), s.copyShardInfo(updatedShardInfo))
1201 > s.taskKeyManager.setRangeID(s.shardInfo.RangeId)
1202 >
1203 > return nil
1204 }
1205
1974 }
1975
1976 > s.contextTaggedLogger.Info("Acquired shard") context_impl.go
1977 >
1978 > // The first time we get the shard, we have to create the engine
1979 > var engine historyi.Engine
1980 > if !s.engineFuture.Ready() {
1981 s.maybeRecordShardAcquisitionLatency(ownershipChanged)
1982 engine = s.createEngine()
1987 // -> information for handover namespace is recorded before shard can servce traffic
1988 // -> upon shard reload, no history api or task can go through for ns in handover state
1989 > err = s.transition(contextRequestAcquired{engine: engine}) context_impl.go
1990 >
1991 > if err != nil {
1992 if engine != nil {
1993 // We tried to set the engine but the context was already stopped