Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up history branch ancestor operation #3046

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Jul 1, 2022

What changed?
Clean up history branch ancestor operation

Why?
Save copy ancestors

How did you test it?
Unit tests

Potential risks

Is hotfix candidate?

@yux0 yux0 requested a review from alexshtin July 1, 2022 02:19
Copy link
Member

@alexshtin alexshtin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

Comment on lines 877 to 878
sortAncestors(historyBranch.GetAncestors())
sortedAncestors := historyBranch.GetAncestors()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add

return ans

to sortAncestors() and replace this 2 lines with:

Suggested change
sortAncestors(historyBranch.GetAncestors())
sortedAncestors := historyBranch.GetAncestors()
sortedAncestors := sortAncestors(historyBranch.GetAncestors())

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

service/history/nDCHistoryReplicator.go Show resolved Hide resolved
@yux0 yux0 marked this pull request as ready for review July 1, 2022 16:23
@yux0 yux0 requested a review from a team as a code owner July 1, 2022 16:23
@yux0 yux0 merged commit 2d7072e into temporalio:master Jul 1, 2022
@yux0 yux0 deleted the cleanup-backfill branch July 1, 2022 18:13
alexshtin pushed a commit that referenced this pull request Jul 8, 2022
* Clean up history branch ancestor operation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants