history_v2_persistence.go ×6

Frontier kind: Code frontier

unlabeled · c_17d9722f8c04

21 tests · 4613 LOC · 183 files · introduces 0 tests · 41 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges41 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
851 ranges4613 lines · 183 files · Browse complete extent
All tests (intent)
21 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: 41 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/persistence-tests/history_v2_persistence.go 28 introduced LOC · 6 ranges

Open complete file

693
694 // persistence helper
695 > func (s *HistoryV2PersistenceSuite) deleteHistoryBranch(branch []byte) error { history_v2_persistence.go
696 >
697 > op := func() error {
698 > return s.ExecutionManager.DeleteHistoryBranch(s.ctx, &p.DeleteHistoryBranchRequest{
699 > BranchToken: branch,
700 > ShardID: s.ShardInfo.GetShardId(),
701 > })
702 > }
703
704 > return backoff.ThrottleRetry(op, historyTestRetryPolicy, isConditionFail) history_v2_persistence.go
705 }
706
707 // persistence helper
708 > func (s *HistoryV2PersistenceSuite) descTree(treeID string) []*persistencespb.HistoryBranch { history_v2_persistence.go
709 > var branches []*persistencespb.HistoryBranch
710 >
711 > var nextPageToken []byte
712 > for {
713 > resp, err := s.ExecutionManager.GetAllHistoryTreeBranches(s.ctx, &p.GetAllHistoryTreeBranchesRequest{
714 > NextPageToken: nextPageToken,
715 > PageSize: 100,
716 > })
717 > s.NoError(err)
718 >
719 > for _, branch := range resp.Branches {
720 if branch.BranchInfo.TreeId == treeID {
721 branches = append(branches, branch.BranchInfo)
780 }
781
782 > func (s *HistoryV2PersistenceSuite) appendNewNode(branch []byte, events []*historypb.HistoryEvent, txnID int64) error { history_v2_persistence.go
783 > return s.append(branch, events, txnID, false, "")
784 > }
785
786 func (s *HistoryV2PersistenceSuite) appendNewBranchAndFirstNode(branch []byte, events []*historypb.HistoryEvent, txnID int64, branchInfo string) error {
go.temporal.io/server/common/persistence/persistence_metric_clients.go 8 introduced LOC · 1 range

Open complete file

1013 ctx context.Context,
1014 request *DeleteHistoryBranchRequest,
1015 > ) (retErr error) { persistence_metric_clients.go
1016 > caller := headers.GetCallerInfo(ctx).CallerName
1017 > startTime := time.Now().UTC()
1018 > defer func() {
1019 > p.recordRequestMetrics(metrics.PersistenceDeleteHistoryBranchScope, caller, time.Since(startTime), retErr)
1020 > p.recordDataLossMetrics(metrics.PersistenceDeleteHistoryBranchScope, caller, retErr, "", "")
1021 > }()
1022 > return p.persistence.DeleteHistoryBranch(ctx, request)
1023 }
1024
go.temporal.io/server/common/persistence/persistence_retryable_clients.go 5 introduced LOC · 2 ranges

Open complete file

559 ctx context.Context,
560 request *DeleteHistoryBranchRequest,
562 > op := func(ctx context.Context) error {
563 > return p.persistence.DeleteHistoryBranch(ctx, request)
564 > }
565
566 > return backoff.ThrottleRetryContext(ctx, op, p.policy, p.isRetryable) persistence_retryable_clients.go
567 }
568