kezhenxu94 commented on a change in pull request #6727:
URL: https://github.com/apache/skywalking/pull/6727#discussion_r620752928
##########
File path:
oap-server/oal-rt/src/main/java/org/apache/skywalking/oal/rt/OALRuntime.java
##########
@@ -194,7 +196,13 @@ private void generateClassAtRuntime(OALScripts oalScripts)
throws OALCompileExce
}
for (Map.Entry<String, DispatcherContext> entry :
allDispatcherContext.getAllContext().entrySet()) {
- dispatcherClasses.add(generateDispatcherClass(entry.getKey(),
entry.getValue()));
+ final String fullClassName = dispatcherClassName(entry.getKey(),
true);
+ if (DISPATCHER_CLASS_CACHE.containsKey(fullClassName)) {
+ continue;
+ }
+ final Class dispatcherClass =
generateDispatcherClass(entry.getKey(), entry.getValue());
+ dispatcherClasses.add(dispatcherClass);
+ DISPATCHER_CLASS_CACHE.put(fullClassName, dispatcherClass);
Review comment:
> I am not sure whether this is correct. About the dispatcher, it
includes the filter logic. Once you skip those, I have a feeling this logic
will be lost.
Yes I missed that.
> I think you should use OAL definition to separate the package names of the
same ServiceDispatcher? Does this work?
Yes, have enhanced the class to allow customized dispatcher class package
--
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]