-
Notifications
You must be signed in to change notification settings - Fork 339
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
CDAP-5277 added caching of plugin instantiators #5528
Conversation
build running : http://builds.cask.co/browse/CDAP-DUT3939-1 |
|
||
@Override | ||
public void onRemoval(RemovalNotification<ArtifactDescriptor, Instantiators> notification) { | ||
Closeables.closeQuietly(notification.getValue()); |
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.
is anything ever removed from the cache? Couldn't see where that would happen
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.
have updated the cache policy to include expireAfterAccess
for 1hr
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 it has to be by size as well.
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.
sorry, just seeing this. the cache key is parent artifact descriptor, so the size of the cache (number of elements) would be less, though the size of the value could be bigger as more plugin methods are invoked. maybe we can set maximumWeight with a custom weigher.
f5f1c40
to
83315a9
Compare
thanks for the review, have addressed the comments @albertshau |
@@ -473,6 +472,12 @@ public void callArtifactPluginMethod(HttpRequest request, HttpResponder responde | |||
"Received empty request body."); | |||
} | |||
|
|||
// should not happen | |||
if (!pluginService.isRunning()) { |
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're worried about this, the logic should be in PluginService rather than in the caller
few more comments |
fe025a0
to
ab0cdb1
Compare
lgtm |
ab0cdb1
to
61e7d8d
Compare
rebased, merging. |
JIRA: https://issues.cask.co/browse/CDAP-5277