-
Notifications
You must be signed in to change notification settings - Fork 827
JAV-469 Edge lb new instance cache manager #232
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
JAV-469 Edge lb new instance cache manager #232
Conversation
@Override | ||
public ClassLoader create(String microserviceName, String version) { | ||
public ClassLoader create(String appId, String microserviceName, String version) { | ||
return Thread.currentThread().getContextClassLoader(); |
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.
If we just return the TCC, maybe we need to update the method name for 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.
this just a Default factory, another PrivateXXXFactory will do a real create
@@ -0,0 +1,3 @@ | |||
cse-config-order: -500 |
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.
Please add the license header here.
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.
discussed, no need to add license here.
|
||
String microserviceVersionFactoryClass = serviceRegistryConfig.getMicroserviceVersionFactory(); | ||
if (microserviceVersionFactoryClass == null) { | ||
return; |
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.
It's better to throw exception here.
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.
in this version, we did not remove old cacheManager, and new cacheManager only used by edge.
so microserviceVersionFactoryClass is null, means not work with edge, will use old cacheManager, can not throw exception
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.
Can we add a comment to the code for 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.
done.
…erviceClassLoaderFactory
…reate interface InstanceCacheManager
…B use new InstanceCacheManager
03af3ad
to
2f4bbe7
Compare
edge use new InstanceCacheManager, normal consumer use old InstanceCacheManager
if there is no problem, then old InstanceCacheManager will be deleted.