Skip to content
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

Merged
merged 1 commit into from
Apr 15, 2016

Conversation

gsps1
Copy link
Contributor

@gsps1 gsps1 commented Apr 13, 2016

@gsps1
Copy link
Contributor Author

gsps1 commented Apr 13, 2016

build running : http://builds.cask.co/browse/CDAP-DUT3939-1


@Override
public void onRemoval(RemovalNotification<ArtifactDescriptor, Instantiators> notification) {
Closeables.closeQuietly(notification.getValue());
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@gsps1 gsps1 force-pushed the feature/caching-plugin-instantiator branch 2 times, most recently from f5f1c40 to 83315a9 Compare April 14, 2016 22:20
@gsps1
Copy link
Contributor Author

gsps1 commented Apr 14, 2016

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()) {
Copy link
Contributor

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

@albertshau
Copy link
Contributor

few more comments

@gsps1 gsps1 force-pushed the feature/caching-plugin-instantiator branch from fe025a0 to ab0cdb1 Compare April 14, 2016 23:57
@albertshau
Copy link
Contributor

lgtm

@gsps1 gsps1 force-pushed the feature/caching-plugin-instantiator branch from ab0cdb1 to 61e7d8d Compare April 15, 2016 18:17
@gsps1
Copy link
Contributor Author

gsps1 commented Apr 15, 2016

rebased, merging.

@gsps1 gsps1 merged commit d4c841e into release/3.4 Apr 15, 2016
@gsps1 gsps1 deleted the feature/caching-plugin-instantiator branch April 15, 2016 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants