api.go ×10

Frontier kind: Code frontier

unlabeled · c_894739d3b84d

16 tests · 8113 LOC · 224 files · introduces 0 tests · 51 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges51 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1735 ranges8113 lines · 224 files · Browse complete extent
All tests (intent)
16 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: 51 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/api/recordworkflowtaskstarted/api.go 35 introduced LOC · 10 ranges

Open complete file

241 }
242
243 > maxHistoryPageSize := int32(config.HistoryMaxPageSize(namespaceEntry.Name().String())) api.go
244 > err = setHistoryForRecordWfTaskStartedResp(
245 > ctx,
246 > shardContext,
247 > workflowKey,
248 > namespaceEntry.Name(),
249 > maxHistoryPageSize,
250 > workflowConsistencyChecker,
251 > eventNotifier,
252 > persistenceVisibilityMgr,
253 > resp,
254 > )
255 > if err != nil {
256 return nil, err
257 }
258 > return resp, nil api.go
259 }
260
269 persistenceVisibilityMgr manager.VisibilityManager,
270 response *historyservice.RecordWorkflowTaskStartedResponseWithRawHistory,
271 > ) (retError error) { api.go
272 >
273 > firstEventID := common.FirstEventID
274 > nextEventID := response.GetNextEventId()
275 > if response.GetStickyExecutionEnabled() {
276 // sticky tasks only need partial history
277 firstEventID = response.GetPreviousStartedEventId() + 1
281 // when data inconsistency occurs
282 // long term solution should check event batch pointing backwards within history store
283 > defer func() { api.go
284 > var dataLossErr *serviceerror.DataLoss
285 > if errors.As(retError, &dataLossErr) {
286 api.TrimHistoryNode(
287 ctx,
296 }()
297
298 > isInternalRawHistoryEnabled := shardContext.GetConfig().SendRawHistoryBetweenInternalServices() api.go
299 > var rawHistory []*commonpb.DataBlob
300 > var persistenceToken []byte
301 > var history *historypb.History
302 > var err error
303 > if isInternalRawHistoryEnabled {
304 rawHistory, persistenceToken, err = api.GetRawHistory(
305 ctx,
315 response.GetBranchToken(),
316 )
317 > } else { api.go
318 history, persistenceToken, err = api.GetHistory(
319 ctx,
331 )
332 }
333 > if err != nil { api.go
334 return err
335 }
336
337 > var continuation []byte api.go
338 > if len(persistenceToken) != 0 {
339 continuation, err = api.SerializeHistoryToken(&tokenspb.HistoryContinuation{
340 RunId: workflowKey.GetRunID(),
348 }
349 }
350 > if isInternalRawHistoryEnabled { api.go
351 historyBlobs := make([][]byte, len(rawHistory))
352 for i, blob := range rawHistory {
361 response.History = history
362 }
363 > response.NextPageToken = continuation api.go
364 > return nil
365 }
366
go.temporal.io/server/api/historyservice/v1/request_response.pb.go 16 introduced LOC · 4 ranges

Open complete file

1635 }
1636
1637 > func (x *RecordWorkflowTaskStartedResponseWithRawHistory) GetNextEventId() int64 { request_response.pb.go
1638 > if x != nil {
1639 > return x.NextEventId
1640 > }
1641 return 0
1642 }
1649 }
1650
1651 > func (x *RecordWorkflowTaskStartedResponseWithRawHistory) GetStickyExecutionEnabled() bool { request_response.pb.go
1652 > if x != nil {
1653 > return x.StickyExecutionEnabled
1654 > }
1655 return false
1656 }
1657
1658 > func (x *RecordWorkflowTaskStartedResponseWithRawHistory) GetTransientWorkflowTask() *v19.TransientWorkflowTaskInfo { request_response.pb.go
1659 > if x != nil {
1660 > return x.TransientWorkflowTask
1661 > }
1662 return nil
1663 }
1670 }
1671
1672 > func (x *RecordWorkflowTaskStartedResponseWithRawHistory) GetBranchToken() []byte { request_response.pb.go
1673 > if x != nil {
1674 > return x.BranchToken
1675 > }
1676 return nil
1677 }