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

kv: fix err check #22994

Closed
wants to merge 8 commits into from
Closed

kv: fix err check #22994

wants to merge 8 commits into from

Conversation

Tjianke
Copy link
Contributor

@Tjianke Tjianke commented Feb 28, 2021

What problem does this PR solve?

Issue Number: #22979

Problem Summary:

What is changed and how it works?

What's Changed:

  • added basic err check
  • some assert failed so I commented them with // to fix:. Needs further action, either ignore these error or fix tests.

Check List

Tests

  • Unit test
  • Integration test

Release note

  • No release note

@ti-chi-bot ti-chi-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 28, 2021
@Tjianke Tjianke marked this pull request as ready for review February 28, 2021 02:33
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2021
kv/mock_test.go Outdated
@@ -56,7 +56,8 @@ func (s testMockSuite) TestInterface(c *C) {
_, err = transaction.IterReverse(Key("lock"))
c.Check(err, IsNil)
}
transaction.Commit(context.Background())
// to fix: cannot assert err, e.g. KV error safe to retry %s
_ = transaction.Commit(context.Background())
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This code just check the API interface, even if here returns an error, it doesn't matter.

@tiancaiamao
Copy link
Contributor

/LGTM

Do we do this to enable the lint check for the test code?

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • tiancaiamao

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 Mar 9, 2021
@Tjianke
Copy link
Contributor Author

Tjianke commented Mar 9, 2021

/LGTM

Do we do this to enable the lint check for the test code?

Yes.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 28, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 30, 2021
@tiancaiamao
Copy link
Contributor

PTAL @zimulala

@@ -50,11 +51,13 @@ func (s testMemDBSuite) TestRandom(c *C) {
op := rand.Float64()
if op < 0.35 {
p1.DeleteKey(k)
p2.Delete(k)
// to fix: delete key not found
_ = p2.Delete(k)
Copy link
Contributor

Choose a reason for hiding this comment

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

@tiancaiamao
I think we need to check this error.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it does not need to be so strict, there is already _ = p2.Put(k, k) in the previous code. And it is a test case.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2021
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 18, 2021
@tisonkun tisonkun mentioned this pull request Apr 22, 2021
8 tasks
@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2021
@tiancaiamao
Copy link
Contributor

/LGTM

Please resolve the conflicts

@ti-chi-bot
Copy link
Member

@tiancaiamao: Please use GitHub review feature instead of /lgtm [cancel] when you want to submit review to the pull request.
For how to use GitHub review feature, see also this document provided by GitHub.

For the reason we drop support to the commands, see also this page.
This reply is being used as a temporary reply during the migration of review process and will be removed on July 1st.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 16, 2021
Signed-off-by: tison <wander4096@gmail.com>
@ti-chi-bot ti-chi-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 16, 2021
@tisonkun
Copy link
Contributor

After integrate with current master, it seems store/tikv files move to client-go, and mock_test.go already changed.

Closed.

@tisonkun tisonkun closed this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 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.

6 participants