stream_receiver.go ×4

Frontier kind: Code frontier

unlabeled · c_45ccbb1c5e77

2 tests · 3466 LOC · 151 files · introduces 0 tests · 38 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges38 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
483 ranges3466 lines · 151 files · Browse complete extent
All tests (intent)
2 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.

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

go.temporal.io/server/service/history/replication/stream_receiver.go 25 introduced LOC · 4 ranges

Open complete file

131
132 // Start starts the processor
133 > func (r *StreamReceiverImpl) Start() { stream_receiver.go
134 > if !atomic.CompareAndSwapInt32(
135 > &r.status,
136 > common.DaemonStatusInitialized,
137 > common.DaemonStatusStarted,
138 > ) {
139 return
140 }
141
142 > go WrapEventLoop(context.Background(), r.sendEventLoop, r.Stop, r.logger, r.MetricsHandler, r.clientShardKey, r.serverShardKey, r.Config) stream_receiver.go
143 > go WrapEventLoop(context.Background(), r.recvEventLoop, r.Stop, r.logger, r.MetricsHandler, r.clientShardKey, r.serverShardKey, r.Config)
144 > go livenessMonitor(
145 > r.recvSignalChan,
146 > r.Config.ReplicationStreamSendEmptyTaskDuration,
147 > r.Config.ReplicationStreamReceiverLivenessMultiplier,
148 > r.shutdownChan,
149 > r.Stop,
150 > r.logger,
151 > )
152 > r.logger.Info("StreamReceiver started.")
153 }
154
163 }
164
165 > r.shutdownChan.Shutdown() stream_receiver.go
166 > r.stream.Close()
167 > r.highPriorityTaskTracker.Cancel()
168 > r.lowPriorityTaskTracker.Cancel()
169 >
170 > r.logger.Info("StreamReceiver shutting down.")
171 }
172
207 r.logger.Debug(fmt.Sprintf("StreamReceiver acked inclusiveLowWatermark %d", inclusiveLowWatermark))
208 }
209 > case <-r.shutdownChan.Channel(): stream_receiver.go
210 > return nil
211 }
212 }
go.temporal.io/server/service/history/replication/stream_receiver_monitor.go 10 introduced LOC · 1 range

Open complete file

284 }
285 for streamKey := range streamKeys {
286 > if _, ok := m.outboundStreams[streamKey]; !ok { stream_receiver_monitor.go
287 > stream := NewStreamReceiver(
288 > m.ProcessToolBox,
289 > m.executableTaskConverter,
290 > streamKey.Client,
291 > streamKey.Server,
292 > )
293 > stream.Start()
294 > m.outboundStreams[streamKey] = stream
295 > }
296 }
297 }
go.temporal.io/server/service/history/replication/stream.go 3 introduced LOC · 2 ranges

Open complete file

87 }
88 // shutdown case
89 > return nil stream.go
90 }
91 _ = backoff.ThrottleRetry(ops, streamRetryPolicy, isRetryableError)
101 ) {
102 select {
103 > case <-shutdownChan.Channel(): stream.go
104 > return
105 case <-signalChan:
106 // Wait for the first message into stream before monitoring.