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

go get tidb version #4

Closed
photoszzt opened this issue Feb 22, 2019 · 16 comments
Closed

go get tidb version #4

photoszzt opened this issue Feb 22, 2019 · 16 comments
Labels
bug Something isn't working

Comments

@photoszzt
Copy link

I'm not sure whether I should file here or in docs. But I follow the document to start using the go client

go get github.com/pingcap/tidb@master
go build

go get downloads [email protected]+incompatible. The during go build, it gives out this error:
/[email protected]+incompatible/store/tikv/kv.go:28:2: unknown import path "github.com/pingcap/pd/pd-client": cannot find module providing package github.com/pingcap/pd/pd-client

I fix this problem by reinitialize the project with

go get github.com/pingcap/[email protected]
@rleungx
Copy link
Member

rleungx commented Feb 23, 2019

@photoszzt Thanks for your feedback!
I tried to reproduce this problem but it failed. Can you paste your go.sum related to pd and tidb? And what is your go version?

@photoszzt
Copy link
Author

@rleungx my go version is go version go1.11.5 linux/amd64
The go.sum that relates to pd and tidb are follows:

github.com/pingcap/pd v2.1.0-rc.4+incompatible/go.mod h1:nD3+EoYes4+aNNODO99ES59V83MZSI+dFbhyr667a0E=
github.com/pingcap/tidb v0.0.0-20190222104944-266ff4b6f37e h1:xQs5Ok4Izhg9kyoJDOvZpEUIo/4xawOAM0KErQFIe0A=
github.com/pingcap/tidb v0.0.0-20190222104944-266ff4b6f37e/go.mod h1:TJqjPfIfyYi+n93XFa46sxy1ckox9BZh++b4RPorK3U=
github.com/pingcap/tidb v2.0.11+incompatible h1:Shz+ry1DzQNsPk1QAejnM+5tgjbwZuzPnIER5aCjQ6c=
github.com/pingcap/tidb v2.0.11+incompatible/go.mod h1:I8C6jrPINP2rrVunTRd7C9fRRhQrtR43S1/CL5ix/yQ=

@rleungx rleungx added the bug Something isn't working label Feb 27, 2019
@rleungx
Copy link
Member

rleungx commented Feb 27, 2019

@photoszzt Sorry for the late reply. This indeed a bug when using the transaction API as the documentation says. I am trying to find out why it happens.

@rleungx
Copy link
Member

rleungx commented Feb 28, 2019

@photoszzt Can you try to replace"github.com/pingcap/tidb/terror" with "github.com/pingcap/parser/terror" to check if it can work?

@photoszzt
Copy link
Author

photoszzt commented Feb 28, 2019

@rleungx Unfortunately, it doesn't fix it. This time I can compile but the application failed to function. I keep geting this error:

ERRO[0000] batchRecvLoop error when receive: rpc error: code = Unimplemented desc =
INFO[0000] batchRecvLoop re-create streaming success

But with the original terror, there's no such problem.

@rleungx
Copy link
Member

rleungx commented Mar 1, 2019

@photoszzt Which version do you use? Since go get github.com/pingcap/tidb@master use the master branch, can you try to use PD and TiKV with the master branch?

@photoszzt
Copy link
Author

@rleungx both tikv and pd are on 2.1.4. I will try the master version.

@photoszzt
Copy link
Author

@rleungx I try the version on master. It works. I think it's better to match the release version for the client API unless people are expected to compile code from master.

@siddontang
Copy link
Contributor

Thanks @photoszzt

Maybe it is better to check all versions at first, we will consider this in tikv/client-go.

@kamijin-fanta
Copy link
Contributor

I used tikv v3.0.0-beta.1. "batchRecvLoop error" was not output.

@rleungx
Copy link
Member

rleungx commented Apr 17, 2019

@kamijin-fanta Thanks for your feedback!
Can you explain more about your operations? Have you followed the instruction here? I am not very clear about your question.

@kamijin-fanta
Copy link
Contributor

@rleungx tikv/go-client calls BatchCommands RPC. This was implemented for the first time in TiKV version 3.0.0-beta.1. I launched TiKV with docker, followed the guide and created a client with tikv.NewRawKVClient.

Caller:

streamClient, err := tikvClient.BatchCommands(context.TODO())

Implementation:
https://github.com/tikv/tikv/blob/v3.0.0-beta.1/src/server/service/kv.rs#L848

And I was success to connect to the old version server by executing config.MaxBatchSize = 0.

@rleungx
Copy link
Member

rleungx commented Apr 19, 2019

@kamijin-fanta To make things more clear, you followed the instruction and run the example of the raw client. But it failed with outputting nothing, am I right?

@siddontang
Copy link
Contributor

seem if we disable batch message with config.MaxBatchSize = 0, we can connect to the 2.1 version of TiKV.

Please verify it @rleungx

@disksing
Copy link
Collaborator

@kamijin-fanta You can try the latest master version. Batch messages disabled by default.

@stale stale bot added the wontfix This issue will not be fixed. label Dec 27, 2019
@zhouqiang-cl zhouqiang-cl removed the wontfix This issue will not be fixed. label Dec 27, 2019
@tikv tikv deleted a comment from stale bot Dec 27, 2019
@disksing
Copy link
Collaborator

Now we can use v2 version. Closing this issue.

mittalrishabh added a commit to mittalrishabh/client-go that referenced this issue Jan 8, 2025
…nvalidStore state and lead to unnecessary backoff (tikv#1115) (tikv#1337)" (tikv#4)

This reverts commit 9e1b9eb.

Co-authored-by: rishabh_mittal <[email protected]>
mittalrishabh pushed a commit to mittalrishabh/client-go that referenced this issue Jan 8, 2025
… cause invalidStore state and lead to unnecessary backoff (tikv#1115) (tikv#1337)" (tikv#4)"

This reverts commit db6b95b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants