-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize: optimize database driver cannot found message(#6760) #6791
Closed
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6791 +/- ##
=========================================
Coverage 52.18% 52.19%
- Complexity 6311 6312 +1
=========================================
Files 1067 1067
Lines 37278 37278
Branches 4427 4427
=========================================
+ Hits 19455 19457 +2
+ Misses 15890 15889 -1
+ Partials 1933 1932 -1
|
slievrly
changed the title
bugfix: Resolve MySQL Driver Loading Issue (#6760)
optimize: optimize database driver cannot found message(#6760)
Aug 28, 2024
funky-eyes
reviewed
Aug 29, 2024
changes/en-us/2.x.md
Outdated
@@ -26,8 +26,9 @@ Add changes here for all PR submitted to the 2.x branch. | |||
- [[#6757](https://github.com/apache/incubator-seata/pull/6757)] the bug where multiple nodes cannot be retrieved from the naming server | |||
- [[#6769](https://github.com/apache/incubator-seata/pull/6769)] fix tcc fence deadLock | |||
- [[#6778](https://github.com/apache/incubator-seata/pull/6778)] fix namingserver node term | |||
- [[#6765](https://github.com/apache/incubator-seata/pull/6765)] fix MySQL driver loading by replacing custom classloader with system classloader for better compatibility and simplified process | |||
- [[#6760](https://github.com/apache/incubator-seata/pull/6765)] fix MySQL driver loading by replacing custom classloader with system classloader for better compatibility and simplified process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
- [[#6760](https://github.com/apache/incubator-seata/pull/6765)] fix MySQL driver loading by replacing custom classloader with system classloader for better compatibility and simplified process | |
- [[#6765](https://github.com/apache/incubator-seata/pull/6765)] fix MySQL driver loading by replacing custom classloader with system classloader for better compatibility and simplified process |
changes/en-us/2.x.md
Outdated
- [[#6781](https://github.com/apache/incubator-seata/pull/6781)] the issue where the TC occasionally fails to go offline from the NamingServer | ||
- [[#6760](https://github.com/apache/incubator-seata/pull/6791)] make exception message generic for all database drivers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
- [[#6760](https://github.com/apache/incubator-seata/pull/6791)] make exception message generic for all database drivers | |
- [[#6791](https://github.com/apache/incubator-seata/pull/6791)] make exception message generic for all database drivers |
lyl2008dsg
force-pushed
the
feature_6760
branch
from
August 31, 2024 08:21
a16e500
to
b0c2bb2
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.
Ⅰ. Describe what this PR did
This PR resolves the issue of the MySQL driver not loading when starting the
apache/seata-server:2.1.0.jre17
Docker image. The fix involves removing the custom classloader setup and relying on the default classloader to handle the MySQL driver loading. Additionally, the MySQL driver jar has been moved from thelib/jdbc
directory to thelib
directory, simplifying the path and ensuring the driver is loaded properly.Ⅱ. Does this pull request fix one issue?
fixes #6760
Ⅲ. Why don't you add test cases (unit test/integration test)?
The changes made pertain to configuration and environment setup, which are typically validated through deployment tests rather than unit or integration tests. Future contributions could focus on creating automated tests for Docker image configurations to ensure environment consistency.
Ⅳ. Describe how to verify it
To verify this fix:
lib
directory.mvn clean install -P release-seata
to build the project.incubator-seata/distribution/target/apache-seata-x.x.x-incubating-bin/apache-seata/bin
and executeseata-server.sh
.application.yml
settings forseata.config.type: file
, and check the logs to verify that thestore.db.driverClassName = com.mysql.cj.jdbc.Driver
setting fromfile.conf
is correctly utilized.Ⅴ. Special notes for reviews
Please focus on the changes made to the classloader behavior and the repositioning of the MySQL driver jar. Confirm that these changes align with best practices for Docker and Java application deployments. Additionally, verify that the removal of custom classloader settings does not inadvertently affect other aspects of the system's behavior.