-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
LocalLoadingCache doesn't ever expand/rehash #1055
Comments
Original comment posted by Ionized on 2012-07-04 at 12:12 AM I of course meant LocalLoadingCache, not LoacalLoadingCache ;) |
Original comment posted by Ionized on 2012-07-04 at 12:13 AM This is using guava-12.0 |
Original comment posted by punya.biswal on 2012-07-04 at 06:08 AM The same problem arises when using Cache<K, V>#get(K, Callable<V>). |
Original comment posted by wasserman.louis on 2012-07-05 at 12:53 PM This seems...really odd. What leads you to the conclusion that expand() never gets called? |
Original comment posted by kak@google.com on 2012-07-05 at 03:03 PM (No comment entered for this change.) Status: |
Original comment posted by fry@google.com on 2012-07-05 at 03:13 PM Wow, this is bad. Why didn't anyone complain sooner??? |
Original comment posted by wasserman.louis on 2012-07-05 at 03:18 PM I'm curious myself why this wasn't picked up sooner...but I'm going to go add expansion tests to all the other custom hash table implementations in Guava now. |
Original comment posted by fry@google.com on 2012-07-05 at 03:50 PM For the record, this was introduced in 85ea291 on Oct 3, 2011. |
Original comment posted by wasserman.louis on 2012-07-05 at 03:51 PM That's...many months for a bug this bad to go unnoticed. |
Original comment posted by kak@google.com on 2012-07-05 at 04:18 PM The fix for this is submitted internally...will definitely make it into 13.0-rc2 and 13.0-final. Status: |
Original comment posted by dterrell on 2012-07-10 at 04:02 AM I noticed this is already backported to the release12 branch, any idea when that might ship? We're very excited for this fix. :) |
Original comment posted by wasserman.louis on 2012-07-10 at 10:45 AM Extremely soon, hopefully within a day or two. We realize how big an issue this is. (We're also working on getting a JDK 5 backport out, so users who want e.g. Android Froyo compatibility aren't stuck on also-affected 11.0.2.) |
Original comment posted by kurt.kluever on 2012-07-10 at 06:58 PM 12.0.1 is shipped and live in Maven Central. See the corresponding announcement here: Thanks! |
Original comment posted by cpovirk@google.com on 2012-07-11 at 08:33 PM (No comment entered for this change.) |
Original comment posted by pascal.gelinas6 on 2012-08-01 at 03:10 PM Any chances for this fix to be backported to version 11? We're stuck with java 1.5 (due to corporate reasons, sadly) and we'd like to have this fix too. It might be a long shot since you dropped the 1.5 support, but I had to try ;) |
Original comment posted by wasserman.louis on 2012-08-01 at 03:22 PM You should reread comment 13. (The JDK 5 backport of Guava 12 is accessible at https://github.com/google/guava/commits/master , but we're still deciding how to package it for the long term, I think?) |
Original comment posted by wasserman.louis on 2012-08-01 at 03:34 PM To clarify: we are committed to providing a JDK5-compatible backport of 12, 13, and future releases, though we're still working out Maven shenanigans right now. |
Original comment posted by michaelbdent on 2012-09-13 at 05:40 AM Any update on 11.0.3? Or even better, any updates on JDK5-compat versions of newer releases? We will be stuck supporting Java 1.5 for the foreseeable future as well. Thanks |
Original issue created by Ionized on 2012-07-04 at 12:03 AM
No matter how many elements get loaded into the LoadingCache, expand() on the Segment never gets called (it gets called on put(), but not on getOrLoad())
The following code reproduces the issue:
CacheLoader<String, Object> loader = new CacheLoader<String, Object>() {
@Override
public Object load(String key) throws Exception {
return key + 1;
}
};
LoadingCache<String, Object> cache = CacheBuilder.newBuilder().build(
loader);
for (int i = 0; i < 100000; i++) {
cache.getUnchecked(i + "");
}
The text was updated successfully, but these errors were encountered: