693
694
// persistence helper
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
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)