namespace_handler.go ×6

Frontier kind: Joint frontier

unlabeled · c_08a10bf55ea5

4 tests · 3581 LOC · 158 files · introduces 3 tests · 48 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges48 lines · 3 files
Tests
3 tests

Contains — complete concept membership

All code (extent)
518 ranges3581 lines · 158 files · Browse complete extent
All tests (intent)
4 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.

3 tests introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

3 files ranked by introduced lines: 48 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/frontend/namespace_handler.go 35 introduced LOC · 6 ranges

Open complete file

594
595 if (configurationChanged || activeClusterChanged) && isGlobalNamespace {
596 > // N.B., it should be sufficient to check only for activeClusterChanged. In order to be defensive, we also namespace_handler.go
597 > // check for configurationChanged. If nothing needs to be updated this will be a no-op.
598 > failoverHistory = d.maybeUpdateFailoverHistory(
599 > failoverHistory,
600 > updateRequest.ReplicationConfig,
601 > getResponse.Namespace,
602 > failoverVersion,
603 > )
604 > }
605
606 replicationConfig.FailoverHistory = failoverHistory
945 var failoverHistory []*replicationpb.FailoverStatus
946 for _, entry := range replicationConfig.GetFailoverHistory() {
947 > failoverHistory = append(failoverHistory, &replicationpb.FailoverStatus{ namespace_handler.go
948 > FailoverTime: entry.GetFailoverTime(),
949 > FailoverVersion: entry.GetFailoverVersion(),
950 > })
951 > }
952
953 return infoResult, configResult, replicationConfigResult, failoverHistory
1079 namespaceDetail *persistencespb.NamespaceDetail,
1080 newFailoverVersion int64,
1081 > ) []*persistencespb.FailoverStatus { namespace_handler.go
1082 > d.logger.Debug(
1083 > "maybeUpdateFailoverHistory",
1084 > tag.Any("failoverHistory", failoverHistory),
1085 > tag.Any("updateReplConfig", updateReplicationConfig),
1086 > tag.Any("namespaceDetail", namespaceDetail),
1087 > )
1088 > if updateReplicationConfig == nil {
1089 d.logger.Debug("updateReplicationConfig was nil")
1090 return failoverHistory
1091 }
1092
1093 > lastFailoverVersion := int64(-1) namespace_handler.go
1094 > if l := len(namespaceDetail.ReplicationConfig.FailoverHistory); l > 0 {
1095 lastFailoverVersion = namespaceDetail.ReplicationConfig.FailoverHistory[l-1].FailoverVersion
1096 }
1097 > if lastFailoverVersion != newFailoverVersion { namespace_handler.go
1098 > now := d.timeSource.Now()
1099 > failoverHistory = append(
1100 > failoverHistory, &persistencespb.FailoverStatus{
1101 > FailoverTime: timestamppb.New(now),
1102 > FailoverVersion: newFailoverVersion,
1103 > },
1104 > )
1105 > }
1106 > if l := len(failoverHistory); l > maxReplicationHistorySize {
1107 failoverHistory = failoverHistory[l-maxReplicationHistorySize : l]
1108 }
1109 > return failoverHistory namespace_handler.go
1110 }
1111
go.temporal.io/server/api/persistence/v1/namespaces.pb.go 8 introduced LOC · 2 ranges

Open complete file

420 }
421
422 > func (x *FailoverStatus) GetFailoverTime() *timestamppb.Timestamp { namespaces.pb.go
423 > if x != nil {
424 > return x.FailoverTime
425 > }
426 return nil
427 }
428
429 > func (x *FailoverStatus) GetFailoverVersion() int64 { namespaces.pb.go
430 > if x != nil {
431 > return x.FailoverVersion
432 > }
433 return 0
434 }
go.temporal.io/server/common/namespace/nsreplication/transmission_task_handler.go 5 introduced LOC · 1 range

Open complete file

137 var replicationProto []*replicationpb.FailoverStatus
138 for _, failoverStatus := range failoverHistoy {
139 > replicationProto = append(replicationProto, &replicationpb.FailoverStatus{ transmission_task_handler.go
140 > FailoverTime: failoverStatus.GetFailoverTime(),
141 > FailoverVersion: failoverStatus.GetFailoverVersion(),
142 > })
143 > }
144
145 return replicationProto