consistency_checker.go ×2

Frontier kind: Joint frontier

unlabeled · c_80e00f8b9de4

1 test · 3178 LOC · 140 files · introduces 1 test · 19 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges19 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
432 ranges3178 lines · 140 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

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

go.temporal.io/server/service/history/api/consistency_checker.go 9 introduced LOC · 2 ranges

Open complete file

207 currentClock := c.shardContext.CurrentVectorClock()
208 if !vclock.Comparable(reqClock, currentClock) {
209 > // request vector clock is not comparable with current shard vector clock consistency_checker.go
210 > return nil
211 > }
212
213 cmpResult, err := vclock.Compare(reqClock, currentClock)
218 return nil
219 }
220 > shardID := c.shardContext.GetShardID() consistency_checker.go
221 > c.shardContext.UnloadForOwnershipLost()
222 > return &persistence.ShardOwnershipLostError{
223 > ShardID: shardID,
224 > Msg: fmt.Sprintf("Shard: %v consistency check failed, reloading", shardID),
225 > }
226 }
227
go.temporal.io/server/service/history/interfaces/shard_context_mock.go 8 introduced LOC · 2 ranges

Open complete file

799
800 // UnloadForOwnershipLost mocks base method.
801 > func (m *MockShardContext) UnloadForOwnershipLost() { shard_context_mock.go
802 > m.ctrl.T.Helper()
803 > m.ctrl.Call(m, "UnloadForOwnershipLost")
804 > }
805
806 // UnloadForOwnershipLost indicates an expected call of UnloadForOwnershipLost.
807 > func (mr *MockShardContextMockRecorder) UnloadForOwnershipLost() *gomock.Call { shard_context_mock.go
808 > mr.mock.ctrl.T.Helper()
809 > return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnloadForOwnershipLost", reflect.TypeOf((*MockShardContext)(nil).UnloadForOwnershipLost))
810 > }
811
812 // UpdateHandoverNamespace mocks base method.
go.temporal.io/server/service/history/vclock/vclock.go 2 introduced LOC · 1 range

Open complete file

23 ) bool {
24 if clock1 == nil || clock2 == nil {
25 > return false vclock.go
26 > }
27 return clock1.GetClusterId() == clock2.GetClusterId() &&
28 clock1.GetShardId() == clock2.GetShardId()