get_history_util.go ×5

Frontier kind: Code frontier

unlabeled · c_6eb3b31d4a99

17 tests · 3850 LOC · 175 files · introduces 0 tests · 33 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges33 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
537 ranges3850 lines · 175 files · Browse complete extent
All tests (intent)
17 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.

2 files ranked by introduced lines: 33 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/get_history_util.go 28 introduced LOC · 5 ranges

Open complete file

201 }
202
203 > logger := shardContext.GetLogger() get_history_util.go
204 > metricsHandler := interceptor.GetMetricsHandlerFromContext(ctx, logger).WithTags(metrics.OperationTag(metrics.HistoryGetHistoryScope))
205 > metrics.HistorySize.With(metricsHandler).Record(int64(size))
206 >
207 > isLastPage := len(nextPageToken) == 0
208 > var firstEvent, lastEvent *historyspb.StrippedHistoryEvent
209 > if len(historyEvents) > 0 {
210 firstEvent = &historyspb.StrippedHistoryEvent{
211 EventId: historyEvents[0].GetEventId(),
215 }
216 }
217 > if err := VerifyHistoryIsComplete( get_history_util.go
218 > shardContext.GetLogger(),
219 > firstEvent,
220 > lastEvent,
221 > len(historyEvents),
222 > firstEventID,
223 > nextEventID-1,
224 > isFirstPage,
225 > isLastPage,
226 > int(pageSize)); err != nil {
227 metrics.ServiceErrIncompleteHistoryCounter.With(metricsHandler).Record(1)
228 logger.Error("getHistory: incomplete history",
232 tag.Error(err))
233 }
234 > if len(nextPageToken) == 0 && transientWorkflowTaskInfo != nil { get_history_util.go
235 // Check if we should include transient/speculative events
236 if shouldIncludeTransientOrSpeculativeTasks(ctx, transientWorkflowTaskInfo) {
248 }
249
250 > if err := ProcessOutgoingSearchAttributes( get_history_util.go
251 > shardContext.GetSearchAttributesProvider(),
252 > shardContext.GetSearchAttributesMapperProvider(),
253 > historyEvents,
254 > namespaceName,
255 > persistenceVisibilityMgr); err != nil {
256 return nil, nil, err
257 }
258
259 > executionHistory := &historypb.History{ get_history_util.go
260 > Events: historyEvents,
261 > }
262 > return executionHistory, nextPageToken, nil
263 }
264
go.temporal.io/server/common/persistence/history_manager_util.go 5 introduced LOC · 1 range

Open complete file

29 return nil, 0, nil, err
30 }
31 > historyEvents = append(historyEvents, response.HistoryEvents...) history_manager_util.go
32 > size += response.Size
33 > if len(historyEvents) >= req.PageSize || len(response.NextPageToken) == 0 {
34 > return historyEvents, size, response.NextPageToken, nil
35 > }
36 req.NextPageToken = response.NextPageToken
37 }