forked from longbridgeapp/gorm-sharding
-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix conn data race #123
Closed
Closed
fix conn data race #123
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add PostgreSQL services for fix database test
improve config
….io/driver/mysql-1.4.1 Bump gorm.io/driver/mysql from 1.3.4 to 1.4.1
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.23.5 to 1.24.0. - [Release notes](https://github.com/go-gorm/gorm/releases) - [Commits](go-gorm/gorm@v1.23.5...v1.24.0) --- updated-dependencies: - dependency-name: gorm.io/gorm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [gorm.io/plugin/dbresolver](https://github.com/go-gorm/dbresolver) from 1.2.2 to 1.3.0. - [Release notes](https://github.com/go-gorm/dbresolver/releases) - [Commits](go-gorm/dbresolver@v1.2.2...v1.3.0) --- updated-dependencies: - dependency-name: gorm.io/plugin/dbresolver dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
….io/gorm-1.24.0 Bump gorm.io/gorm from 1.23.5 to 1.24.0
….io/plugin/dbresolver-1.3.0 Bump gorm.io/plugin/dbresolver from 1.2.2 to 1.3.0
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.3.7 to 1.4.4. - [Release notes](https://github.com/go-gorm/postgres/releases) - [Commits](go-gorm/postgres@v1.3.7...v1.4.4) --- updated-dependencies: - dependency-name: gorm.io/driver/postgres dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
….io/driver/postgres-1.4.4 Bump gorm.io/driver/postgres from 1.3.7 to 1.4.4
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.4.8 to 1.5.0. - [Release notes](https://github.com/go-gorm/postgres/releases) - [Commits](go-gorm/postgres@v1.4.8...v1.5.0) --- updated-dependencies: - dependency-name: gorm.io/driver/postgres dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.24.7-0.20230306060331-85eaf9eeda11 to 1.25.1. - [Release notes](https://github.com/go-gorm/gorm/releases) - [Commits](https://github.com/go-gorm/gorm/commits/v1.25.1) --- updated-dependencies: - dependency-name: gorm.io/gorm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
… an error was reported in the primary key generation
…m.io/gorm-1.25.1 Bump gorm.io/gorm from 1.24.7-0.20230306060331-85eaf9eeda11 to 1.25.1
Bumps [gorm.io/hints](https://github.com/go-gorm/hints) from 1.1.1 to 1.1.2. - [Commits](go-gorm/hints@v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: gorm.io/hints dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
When the table suffix is non numeric, the insertion operation will report an error when generating the primary key ID
…m.io/hints-1.1.2 Bump gorm.io/hints from 1.1.1 to 1.1.2
Please correct me if I am wrong or miss something. |
Seems like the MariaDB job failed, because of container initializing failure. |
* Auto-fill `id` is now optional.
liangjunmo
force-pushed
the
fix-conn-data-race
branch
from
August 25, 2023 12:03
020614a
to
163e891
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did this pull request do?
Fix conn DARA RACE issue. There are some related issues like #96.
User Case Description
I use this package for sharding bill table. It runs normally on test environment, but occur DATA RACE issue on online environment.
I write unit test for this issue:
Run this unit test on main branch with
go test --race -count=1 -v --run=TestDataRace
, it will output: