You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = JdbcRegistryAutoConfiguration.class)
})
@Slf4j
publicclassWorkerServerimplementsIStoppable {
This will allow us to know the module relation difficultly, furthermore, if there exists an unexpected module in the application, the beans in this module will be loaded into memory, e.g. worker load dao module.
So it's better avoid scan whole project.
Design Detail
First, the application should only scan the package of the bootstrap class. Other package beans should be import by Configuration.
Search before asking
Motivation
Right now we will scan all beans under
org.apache.dolphinscheduler
inAlertServer
dolphinscheduler/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java
Lines 45 to 48 in 325bfa8
ApiServer
dolphinscheduler/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/ApiApplicationServer.java
Lines 47 to 51 in 325bfa8
MasterServer
dolphinscheduler/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/MasterServer.java
Lines 54 to 60 in 325bfa8
WorkerServer.
dolphinscheduler/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/WorkerServer.java
Lines 56 to 60 in 325bfa8
This will allow us to know the module relation difficultly, furthermore, if there exists an unexpected module in the application, the beans in this module will be loaded into memory, e.g. worker load dao module.
So it's better avoid scan whole project.
Design Detail
First, the application should only scan the package of the bootstrap class. Other package beans should be import by Configuration.
Second, the plugin beans should be registered by
AutoConfiguration
.Compatibility, Deprecation, and Migration Plan
Compatibility with 3.x version.
Test Plan
Test by UT and E2E
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: