wu-sheng commented on a change in pull request #6538:
URL: https://github.com/apache/skywalking/pull/6538#discussion_r592352813
##########
File path:
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java
##########
@@ -315,6 +316,8 @@ public void start() throws ModuleStartException {
.registerRemote(gRPCServerInstance);
}
+
OAPNodeChecker.setROLE(CoreModuleConfig.Role.valueOf(moduleConfig.getRole()));
Review comment:
This is not a perfect way to do this. Take a look at how L304 works. We
should add this as a part of that IF.
Your way in here could cause `IllegalArgumentException` if a user sets the
value as `mixed1`, rather than `Mixed`. The whole OAP will fail. If you use the
better way, then it just fails back to the Mixed mode.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]