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

store/tikv/retry: make several BackoffType constants private #24654

Closed
wants to merge 2 commits into from

Conversation

AndreMouche
Copy link
Contributor

Signed-off-by: AndreMouche

What problem does this PR solve?

This PR makes several constants BackOffType private, so the caller needn't learn about the BackoffType, and also the BackoffType should be an enum while golang doesn't support, with this PR we can protect the new BackoffType created by caller too.

Part of #22513

Check List

Tests

  • Unit test

Release note

  • No release note

@ti-chi-bot ti-chi-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 14, 2021
Signed-off-by: shirly <AndreMouche@126.com>
@AndreMouche AndreMouche force-pushed the backoff/backofftype branch from 360e513 to 8d3f947 Compare May 14, 2021 03:21
@Rustin170506 Rustin170506 removed their request for review May 14, 2021 03:52
@@ -374,7 +374,7 @@ func (s *testStmtSummarySuite) TestAddStatement(c *C) {
expectedSummaryElement.sumPrewriteRegionNum += int64(stmtExecInfo3.ExecDetail.CommitDetail.PrewriteRegionNum)
expectedSummaryElement.sumTxnRetry += int64(stmtExecInfo3.ExecDetail.CommitDetail.TxnRetry)
expectedSummaryElement.sumBackoffTimes += 1
expectedSummaryElement.backoffTypes[tikv.BoTxnLock] = 2
expectedSummaryElement.backoffTypes[retry.BoTxnLock] = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Wish we could get rid of this reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe next PR?

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • sticnarf

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 14, 2021
@AndreMouche
Copy link
Contributor Author

This PR will be closed since we find a better way to fix this situation #24692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants