context_impl.go ×4

Frontier kind: Code frontier

unlabeled · c_3b39e96d0cad

28 tests · 3684 LOC · 153 files · introduces 0 tests · 27 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges27 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
533 ranges3684 lines · 153 files · Browse complete extent
All tests (intent)
28 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: 27 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/shard/context_impl.go 27 introduced LOC · 4 ranges

Open complete file

1804 return err
1805 }
1806 > *ownershipChanged = resp.ShardInfo.Owner != s.owner context_impl.go
1807 > shardInfo := trimShardInfo(s.config, s.clusterMetadata.GetAllClusterInfo(), s.copyShardInfo(resp.ShardInfo))
1808 > shardInfo.Owner = s.owner
1809 >
1810 > // initialize the cluster current time to be the same as ack level
1811 > remoteClusterInfos := make(map[string]*remoteClusterInfo)
1812 > var taskMinScheduledTime time.Time
1813 > currentClusterName := s.GetClusterMetadata().GetCurrentClusterName()
1814 > taskCategories := s.taskCategoryRegistry.GetCategories()
1815 > for clusterName, info := range s.GetClusterMetadata().GetAllClusterInfo() {
1816 > if !info.Enabled {
1817 continue
1818 }
1819
1820 > exclusiveMaxReadTime := tasks.DefaultFireTime context_impl.go
1821 > for categoryID, queueState := range shardInfo.QueueStates {
1822 category, ok := taskCategories[int(categoryID)]
1823 if !ok || category.Type() != tasks.CategoryTypeScheduled {
1833 // Once we validate the rest of the code can worker correctly with higher precision, the code should simply be
1834 // taskMinScheduledTime = util.MaxTime(taskMinScheduledTime, maxReadTime)
1835 > taskMinScheduledTime = util.MaxTime( context_impl.go
1836 > taskMinScheduledTime,
1837 > exclusiveMaxReadTime.Add(common.ScheduledTaskMinPrecision).Truncate(common.ScheduledTaskMinPrecision),
1838 > )
1839 >
1840 > if clusterName != currentClusterName {
1841 remoteClusterInfos[clusterName] = &remoteClusterInfo{
1842 CurrentTime: exclusiveMaxReadTime,
1847 }
1848
1849 > s.wLock() context_impl.go
1850 > defer s.wUnlock()
1851 >
1852 > s.shardInfo = shardInfo
1853 > s.remoteClusterInfos = remoteClusterInfos
1854 > s.taskKeyManager.setTaskMinScheduledTime(taskMinScheduledTime)
1855 >
1856 > return nil
1857 }
1858