-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Data race between mysqlConn watcher and okHandler during context cancellation #1559
Comments
I am seeing something similar: https://github.com/openfga/openfga/actions/runs/8271747091/job/22632184961
|
5 tasks
methane
added a commit
that referenced
this issue
Mar 17, 2024
methane
added a commit
to methane/mysql
that referenced
this issue
Mar 17, 2024
Fix go-sql-driver#1559. (cherry picked from commit d86c452)
methane
added a commit
to methane/mysql
that referenced
this issue
Mar 17, 2024
Fix go-sql-driver#1559. (cherry picked from commit d86c452)
methane
added a commit
that referenced
this issue
Mar 17, 2024
I merged the fix to 1.8 branch. |
That fix is working for me. Thank you for the quick response. |
5 tasks
shogo82148
added a commit
that referenced
this issue
Mar 26, 2024
### Description #1559 and #1567 are fixed. Let's release a new version v1.8.1. ### Checklist - [x] Code compiles correctly - [x] Created tests which fail without the change (if possible) - [x] All tests passing - [x] Extended the README / documentation, if necessary - [x] Added myself / the copyright holder to the AUTHORS file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Addressed race condition issues for enhanced stability. - **New Features** - Improved database compatibility with charset and collation adjustments. - Enhanced security and flexibility through the introduction of new configuration options. - **Major Changes** - Dropped support for older versions of Go (1.13-1.17) to leverage newer language features. - Improved number parsing for efficiency and accuracy. - Added configurable logging per connection for better diagnostics. - **Enhancements** - Fixed issues with ColumnType.DatabaseTypeName to improve data handling. - Introduced connection attributes for more detailed connection information. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
shogo82148
added a commit
to shogo82148/mysql
that referenced
this issue
Mar 26, 2024
### Description go-sql-driver#1559 and go-sql-driver#1567 are fixed. Let's release a new version v1.8.1. ### Checklist - [x] Code compiles correctly - [x] Created tests which fail without the change (if possible) - [x] All tests passing - [x] Extended the README / documentation, if necessary - [x] Added myself / the copyright holder to the AUTHORS file <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Addressed race condition issues for enhanced stability. - **New Features** - Improved database compatibility with charset and collation adjustments. - Enhanced security and flexibility through the introduction of new configuration options. - **Major Changes** - Dropped support for older versions of Go (1.13-1.17) to leverage newer language features. - Improved number parsing for efficiency and accuracy. - Added configurable logging per connection for better diagnostics. - **Enhancements** - Fixed issues with ColumnType.DatabaseTypeName to improve data handling. - Introduced connection attributes for more detailed connection information. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
I have one goroutine running database transactions in a loop and another goroutine cancels the context being used. This leads to the data race shown below.
Example code
Execute with
go test -v -race . -test.count 1000 -test.failfast -test.run 'TestRace'
Error log
Configuration
Driver version (or git SHA): 1.8.0
Go version: 1.20.7 & 1.22.1
Server version: mysql-v8 & mariadb-v10
Server OS: Ubuntu 22.04 (an
ubuntu-latest
GitHub actions runner)The text was updated successfully, but these errors were encountered: