Upgrade TiDB to v3.0 #160

Closed
opened 2026-02-19 23:03:06 -05:00 by deekerman · 7 comments
Owner

Originally created by @lastzero on GitHub (Jan 13, 2020).

Originally assigned to: @cuongcb on GitHub.

As a developer, I want to use the latest stable version of TiDB so that my users get the best performance and there are no security issues.

Sadly, go get -u -t ./... doesn't do the trick:

go get: upgrading github.com/pingcap/tidb@v2.1.11+incompatible: github.com/pingcap/tidb@v2.1.11+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required

Not sure what the issue is here. They have a lot of dependencies and it never was easy to figure out, which versions work together although that might have improved recently.

Once dependencies are upgraded, we might have to change some things in our bootstrap code:

https://github.com/photoprism/photoprism/tree/develop/internal/tidb

Acceptance Criteria:

  • TiDB is upgraded to v3.0.x (latest stable)
  • Everything works like before
Originally created by @lastzero on GitHub (Jan 13, 2020). Originally assigned to: @cuongcb on GitHub. **As a developer, I want to use the latest stable version of TiDB so that my users get the best performance and there are no security issues.** Sadly, `go get -u -t ./...` doesn't do the trick: > go get: upgrading github.com/pingcap/tidb@v2.1.11+incompatible: github.com/pingcap/tidb@v2.1.11+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required Not sure what the issue is here. They have a lot of dependencies and it never was easy to figure out, which versions work together although that might have improved recently. Once dependencies are upgraded, we might have to change some things in our bootstrap code: https://github.com/photoprism/photoprism/tree/develop/internal/tidb Acceptance Criteria: - [ ] TiDB is upgraded to v3.0.x (latest stable) - [ ] Everything works like before
deekerman 2026-02-19 23:03:06 -05:00
Author
Owner

@ArchiMoebius commented on GitHub (Apr 9, 2020):

Peeking at the issue - it looks like x-server went away: https://github.com/pingcap/tidb/pull/9038 - fun fun...

@ArchiMoebius commented on GitHub (Apr 9, 2020): Peeking at the issue - it looks like x-server went away: https://github.com/pingcap/tidb/pull/9038 - fun fun...
Author
Owner

@cuongcb commented on GitHub (Apr 21, 2020):

Is there currently anybody in charge of this issue? I'm new to photoprism and I got this problem too. I wanna give it a try.

@cuongcb commented on GitHub (Apr 21, 2020): Is there currently anybody in charge of this issue? I'm new to photoprism and I got this problem too. I wanna give it a try.
Author
Owner

@lastzero commented on GitHub (Apr 21, 2020):

@cuongcb You're most welcome to help with this! We're currently working on the Web UI, so merge conflicts are unlikely :)

@lastzero commented on GitHub (Apr 21, 2020): @cuongcb You're most welcome to help with this! We're currently working on the Web UI, so merge conflicts are unlikely :)
Author
Owner

@skyeskie commented on GitHub (Apr 21, 2020):

The specific error with go get is due to https://github.com/pingcap/tidb/issues/16381

@skyeskie commented on GitHub (Apr 21, 2020): The specific error with `go get` is due to https://github.com/pingcap/tidb/issues/16381
Author
Owner

@cuongcb commented on GitHub (Apr 22, 2020):

The specific error with go get is due to pingcap/tidb#16381

Thank @skyeskie for a detailed reply.
Additionally, we can get the latest version of TiDB by issuing go get github.com/pingcap/tidb@master and a random-generated version number will be assigned in our go.mod. But as @poerhiza pointed out above, TiDB removed the x-server from their source. So now we have to deal with the replacement of x-server.

@cuongcb commented on GitHub (Apr 22, 2020): > The specific error with `go get` is due to [pingcap/tidb#16381](https://github.com/pingcap/tidb/issues/16381) Thank @skyeskie for a detailed reply. Additionally, we can get the latest version of TiDB by issuing `go get github.com/pingcap/tidb@master` and a random-generated version number will be assigned in our `go.mod`. But as @poerhiza pointed out above, TiDB removed the `x-server` from their source. So now we have to deal with the replacement of `x-server`.
Author
Owner

@cuongcb commented on GitHub (Apr 30, 2020):

For anyone that has the same issue:

go get: upgrading github.com/pingcap/tidb@v2.1.11+incompatible:
github.com/pingcap/tidb@v2.1.11+incompatible: invalid version: +incompatible suffix not allowed:
module contains a go.mod file, so semantic import versioning is required

and still want to keep the photoprism working with the old version of tidb (v2.1.11), please follow these steps:

  • Remove all pingcap-related packages from go.mod
  • Remove client_golang package from go.mod
  • go get -u -t github.com/pingcap/tidb@5ea2830cd7793b166d811d0a65a9c618296cd963

Start photoprism~

@cuongcb commented on GitHub (Apr 30, 2020): For anyone that has the same issue: ``` go get: upgrading github.com/pingcap/tidb@v2.1.11+incompatible: github.com/pingcap/tidb@v2.1.11+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required ``` and still want to keep the `photoprism` working with the old version of `tidb` (v2.1.11), please follow these steps: * Remove all pingcap-related packages from `go.mod` * Remove `client_golang` package from `go.mod` * `go get -u -t github.com/pingcap/tidb@5ea2830cd7793b166d811d0a65a9c618296cd963` Start photoprism~
Author
Owner

@lastzero commented on GitHub (May 1, 2020):

FYI: When upgrading github.com/golang/protobuf from v1.3.5 to 1.4.0, TiDB experienced a fatal error. Had to downgrade again: github.com/photoprism/photoprism@743b2dc348

@lastzero commented on GitHub (May 1, 2020): FYI: When upgrading github.com/golang/protobuf from v1.3.5 to 1.4.0, TiDB experienced a fatal error. Had to downgrade again: https://github.com/photoprism/photoprism/commit/743b2dc34802d4b4441e6b945c06d6173d00029c
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#160
No description provided.