-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Instead of datasource-settings.properties, use application.yml for MySQLStorageProvider #3564
Conversation
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.
I think, you should make Module configuration injection to support properties or map. Using DynamicModuleConfig has a limit, if you have two properties typd fields.
And making field type extension should be more elegance.
Make sense?
And you should raise a MySQL e2e PR to across verify this.
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.
See comments inline, and the term Dynamic Config
has special meaning in SkyWalking, so I think DynamicModuleConfig
may be confusing to our users, they may think that the datasource configurations can be dynamically modified at runtime, which is not the case.
...odule/src/main/java/org/apache/skywalking/oap/server/library/module/DynamicModuleConfig.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/mysql/MySQLStorageProvider.java
Outdated
Show resolved
Hide resolved
@tristaZero read the dynamic configuration in backend advanced feature. You will find out why. |
What sceneria two properties is necessary? Why don't we put the settings from two properties into one properties? |
I said this in design level. ModuleConfig injection is one of oap core features. This is field type triggered, so when you want properties field, I prefer this way. For example, you could support properties to match the yaml map type. |
This PR could be separated into 3 PRs
|
One remind, once you change the mysql config, you need to change this too. skywalking/docker/oap/docker-entrypoint.sh Lines 134 to 140 in 81f4c08
FYI @kezhenxu94 Do you have any idea, how to make the docker-compose checked in CI? |
The properties of one
So one properties can contain all the settings below |
I am not saying in MySQL provider, you need two or more properties fields. Clearly you don't.
Those two are in core module, which means, being satisfied for MySQL implementation is not enough. That is what I mean in design level. You never know which provider will use two properties, even sometimes they are not open source implementation in the upstream. So, once we want to support properties type, which makes totally sense to me, we should bring a good and elegance feature in the core. Is this clear for you now? |
...r/src/main/java/org/apache/skywalking/oap/server/starter/config/ApplicationConfigLoader.java
Show resolved
Hide resolved
Do we have two datasource-settings.properties files? I remember so. Only find one deleted, please confirm. Verified, yes, there are two files. You seem to miss one. |
@tristaZero and it seems that you forgot the reminder above |
Thanks for your reminder, i deleted it. |
Thanks, fixed it. |
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.
Basically, this PR LGTM. @kezhenxu94 What do you think?
I expect a new e2e test case added to test MySQL storage, but before doing that, I hope you could separate our e2e into 2 groups rather than 4, even 5(if MySQL added), which cost unpredictable CPU in CI env. Agree?
Is #3583 the same one with what your mentioned? |
That is only plugin test. I mean e2e test, check |
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.
@wu-sheng This PR looks good to me too now, if we don't expect to include an (MySQL) e2e test in this PR, I'm ok to merge this, and I'm slightly refactor the e2e running script in my ES7 adaptation PR, as what you expect (2 groups)
I will wait for the unit test for the new properties field, then I think the MySQL e2e could start in another PR. |
Sure. Look forward to your new PR about this feature. I think the community will like this. |
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.
LGTM. Look forward to your e2e PR.
Please answer these questions before submitting pull request
Why submit this pull request?
Bug fix
New feature provided
Improve performance
Related issues
Bug fix
Bug description.
How to fix?
1.Create DynamicModuleConfig
2.Create MySQLStorageConfig
3.Modify ModuleDefine for using ModuleConfiguration.
4.Add all properties of HikariCP to application.yml
5.Delete datasource-settings.properties
New feature or improvement