history_v2_persistence.go ×2

Frontier kind: Code frontier

unlabeled · c_1d6c8f2506bf

14 tests · 4740 LOC · 183 files · introduces 0 tests · 37 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges37 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
877 ranges4740 lines · 183 files · Browse complete extent
All tests (intent)
14 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: 37 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/persistence-tests/history_v2_persistence.go 20 introduced LOC · 2 ranges

Open complete file

816
817 // persistence helper
818 > func (s *HistoryV2PersistenceSuite) fork(forkBranch []byte, forkNodeID int64) ([]byte, error) { history_v2_persistence.go
819 >
820 > bi := []byte{}
821 >
822 > op := func() error {
823 > var err error
824 > resp, err := s.ExecutionManager.ForkHistoryBranch(s.ctx, &p.ForkHistoryBranchRequest{
825 > ForkBranchToken: forkBranch,
826 > ForkNodeID: forkNodeID,
827 > Info: testForkRunID,
828 > ShardID: s.ShardInfo.GetShardId(),
829 > NamespaceID: uuid.NewString(),
830 > NewRunID: uuid.NewString(),
831 > })
832 > if resp != nil {
833 > bi = resp.NewBranchToken
834 > }
835 > return err
836 }
837
838 > err := backoff.ThrottleRetry(op, historyTestRetryPolicy, isConditionFail) history_v2_persistence.go
839 > return bi, err
840 }
go.temporal.io/server/common/persistence/persistence_retryable_clients.go 9 introduced LOC · 2 ranges

Open complete file

543 ctx context.Context,
544 request *ForkHistoryBranchRequest,
545 > ) (*ForkHistoryBranchResponse, error) { persistence_retryable_clients.go
546 > var response *ForkHistoryBranchResponse
547 > op := func(ctx context.Context) error {
548 > var err error
549 > response, err = p.persistence.ForkHistoryBranch(ctx, request)
550 > return err
551 > }
552
553 > err := backoff.ThrottleRetryContext(ctx, op, p.policy, p.isRetryable) persistence_retryable_clients.go
554 > return response, err
555 }
556
go.temporal.io/server/common/persistence/persistence_metric_clients.go 8 introduced LOC · 1 range

Open complete file

999 ctx context.Context,
1000 request *ForkHistoryBranchRequest,
1001 > ) (_ *ForkHistoryBranchResponse, retErr error) { persistence_metric_clients.go
1002 > caller := headers.GetCallerInfo(ctx).CallerName
1003 > startTime := time.Now().UTC()
1004 > defer func() {
1005 > p.recordRequestMetrics(metrics.PersistenceForkHistoryBranchScope, caller, time.Since(startTime), retErr)
1006 > p.recordDataLossMetrics(metrics.PersistenceForkHistoryBranchScope, caller, retErr, "", "")
1007 > }()
1008 > return p.persistence.ForkHistoryBranch(ctx, request)
1009 }
1010