remote_history_paginated_fetcher.go ×6

Frontier kind: Joint frontier

unlabeled · c_511db31c54af

2 tests · 2677 LOC · 137 files · introduces 1 test · 44 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges44 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
413 ranges2677 lines · 137 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.

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: 44 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/replication/eventhandler/remote_history_paginated_fetcher.go 37 introduced LOC · 6 ranges

Open complete file

179 pageSize int32,
180 inclusive bool,
181 > ) ([]*HistoryBatch, []byte, error) { remote_history_paginated_fetcher.go
182 >
183 > logger := log.With(n.Logger, tag.WorkflowRunID(runID))
184 >
185 > ctx, cancel := rpc.NewContextFromParentWithTimeoutAndVersionHeaders(ctx, resendContextTimeout)
186 > defer cancel()
187 >
188 > adminClient, err := n.ClientBean.GetRemoteAdminClient(remoteClusterName)
189 > if err != nil {
190 return nil, nil, err
191 }
192 > getResponse := func() ([]*commonpb.DataBlob, *historyspb.VersionHistory, []byte, error) { remote_history_paginated_fetcher.go
193 > if inclusive {
194 response, err := adminClient.GetWorkflowExecutionRawHistory(ctx, &adminservice.GetWorkflowExecutionRawHistoryRequest{
195 NamespaceId: namespaceID.String(),
210 return response.GetHistoryBatches(), response.GetVersionHistory(), response.NextPageToken, nil
211 }
212 > response, err := adminClient.GetWorkflowExecutionRawHistoryV2(ctx, &adminservice.GetWorkflowExecutionRawHistoryV2Request{ remote_history_paginated_fetcher.go
213 > NamespaceId: namespaceID.String(),
214 > Execution: &commonpb.WorkflowExecution{
215 > WorkflowId: workflowID,
216 > RunId: runID,
217 > },
218 > StartEventId: startEventID,
219 > StartEventVersion: startEventVersion,
220 > EndEventId: endEventID,
221 > EndEventVersion: endEventVersion,
222 > MaximumPageSize: pageSize,
223 > NextPageToken: token,
224 > })
225 > if err != nil {
226 return nil, nil, nil, err
227 }
228 > return response.GetHistoryBatches(), response.GetVersionHistory(), response.NextPageToken, nil remote_history_paginated_fetcher.go
229 }
230
231 > dataBlobs, versionHistory, nextPageToken, err := getResponse() remote_history_paginated_fetcher.go
232 > if err != nil {
233 logger.Error("error getting history", tag.Error(err))
234 return nil, nil, err
235 }
236
237 > batches := make([]*HistoryBatch, 0, len(dataBlobs)) remote_history_paginated_fetcher.go
238 > for _, history := range dataBlobs {
239 > batch := &HistoryBatch{
240 > VersionHistory: versionHistory,
241 > RawEventBatch: history,
242 > }
243 > batches = append(batches, batch)
244 > }
245 > return batches, nextPageToken, nil
246 }
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 4 introduced LOC · 1 range

Open complete file

1249 }
1250
1251 > func (x *GetWorkflowExecutionRawHistoryV2Response) GetVersionHistory() *v11.VersionHistory { request_response.pb.go
1252 > if x != nil {
1253 > return x.VersionHistory
1254 > }
1255 return nil
1256 }
go.temporal.io/server/common/rpc/context.go 3 introduced LOC · 1 range

Open complete file

44
45 // NewContextFromParentWithTimeoutAndVersionHeaders creates context from parent context with timeout and version headers.
46 > func NewContextFromParentWithTimeoutAndVersionHeaders(parentCtx context.Context, timeout time.Duration) (context.Context, context.CancelFunc) { context.go
47 > return context.WithTimeout(headers.SetVersions(parentCtx), timeout)
48 > }