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

adds a cache for Tasks, which are never changed #722

Merged
merged 5 commits into from Oct 12, 2015
Merged

adds a cache for Tasks, which are never changed #722

merged 5 commits into from Oct 12, 2015

Conversation

@wsorenson
Copy link
Contributor

@wsorenson wsorenson commented Oct 6, 2015

No description provided.

}

private <T> List<T> getAsyncThrows(final String pathNameForLogs, final Collection<String> paths, final Transcoder<T> transcoder) throws Exception {
private <T> List<T> getAsyncThrows(final String pathNameForLogs, final Collection<String> paths, final Transcoder<T> transcoder, final Optional<ZkCache<T>> cache) throws Exception {
final List<T> objects = Lists.newArrayListWithCapacity(paths.size());
Copy link
Member

@jhaber jhaber Oct 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside the scope of this PR but it looks like the ArrayList being used here is modified concurrently from multiple threads which seems like it could cause problems

Loading

}

public ZkCache(int maxSize, int initialSize, MetricRegistry registry, String name) {
cache = CacheBuilder.newBuilder().maximumSize(5000).concurrencyLevel(2).initialCapacity(100).build();
Copy link
Member

@tpetr tpetr Oct 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to wire up args

Loading

@tpetr tpetr added this to the 0.4.6 milestone Oct 7, 2015
wsorenson added a commit that referenced this issue Oct 12, 2015
adds a cache for Tasks, which are never changed
@wsorenson wsorenson merged commit 0e481db into master Oct 12, 2015
2 checks passed
Loading
@tpetr tpetr removed hs_qa labels Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants