stream_receiver_monitor.go ×4

Frontier kind: Joint frontier

unlabeled · c_f7333cb6d592

1 test · 3232 LOC · 145 files · introduces 1 test · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
4 ranges24 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
439 ranges3232 lines · 145 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.

1 file ranked by introduced lines: 24 introduced LOC across 4 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/replication/stream_receiver_monitor.go 24 introduced LOC · 4 ranges

Open complete file

337 }
338
339 > func (m *StreamReceiverMonitorImpl) evaluateSingleStreamConnection(key *ClusterShardKeyPair, current *streamStatus, previous *streamStatus) bool { stream_receiver_monitor.go
340 > if previous == nil || current == nil { // cluster metadata change or shard movement could cause stream reconnect and status could be nil
341 return true
342 }
343 > if previous.isTieredStackEnabled != current.isTieredStackEnabled { // there is tiered stack config change, wait until it becomes stable stream_receiver_monitor.go
344 return true
345 }
346 > checkIfMakeProgress := func(priority enumsspb.TaskPriority, currentAckLevel int64, currentMaxTaskId int64, previousAckLevel int64, previousMaxReplicationTaskId int64) bool { stream_receiver_monitor.go
347 > // 2 continuous data points where ACK level is not moving forward and ACK level is behind previous Max Replication taskId
348 > if currentAckLevel == previousAckLevel && currentAckLevel < previousMaxReplicationTaskId {
349 > m.Logger.Error(
350 > fmt.Sprintf("%v replication is not making progress. previousAckLevel: %v, previousMaxTaskId: %v, currentAckLevel: %v, currentMaxTaskId: %v",
351 > priority.String(), previousAckLevel, previousMaxReplicationTaskId, currentAckLevel, currentMaxTaskId),
352 > tag.SourceShardID(key.Server.ShardID), tag.TargetCluster(strconv.Itoa(int(key.Client.ClusterID))), tag.TargetShardID(key.Client.ShardID))
353 > metrics.ReplicationStreamStuck.With(m.MetricsHandler).Record(
354 > int64(1),
355 > metrics.FromClusterIDTag(key.Server.ClusterID),
356 > metrics.ToClusterIDTag(key.Client.ClusterID),
357 > )
358 > return false
359 > }
360 > return true
361 }
362
363 > if !current.isTieredStackEnabled { stream_receiver_monitor.go
364 > return checkIfMakeProgress(enumsspb.TASK_PRIORITY_UNSPECIFIED, current.defaultAckLevel, current.maxReplicationTaskId, previous.defaultAckLevel, previous.maxReplicationTaskId)
365 > }
366 > highPriorityResult := checkIfMakeProgress(enumsspb.TASK_PRIORITY_HIGH, current.highPriorityAckLevel, current.maxReplicationTaskId, previous.highPriorityAckLevel, previous.maxReplicationTaskId)
367 > lowPriorityResult := checkIfMakeProgress(enumsspb.TASK_PRIORITY_LOW, current.lowPriorityAckLevel, current.maxReplicationTaskId, previous.lowPriorityAckLevel, previous.maxReplicationTaskId)
368 > return highPriorityResult && lowPriorityResult
369 }
370