Donate Share February 2008: Project of the Month

ehcache

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

DiskStore breaking change in 1.6.1

You are viewing a single message from this topic. View all messages.

  1. 2009-08-19 14:49:53 UTC
    I was happy to see that some concurrency problems in DiskStore were fixed in 1.6.1, but upon upgrading from 1.6, I noticed a rather important breaking change. DiskStore v1.6.1 expects to find a ConcurrentHashMap on the ObjectInputStream, but it looks like DiskStore v1.6 wrote out a java.util.Collections$SynchronizedMap. I think a minor change could be made around line 874 of DiskStore to just expect a Map and copy it into a ConcurrentHashMap if it can't be cast to that. I could write a patch for it. Are there any version-to-version migration tests that would cover a situation like this?

    Stacktrace:
    net.sf.ehcache.CacheException: datasourceStateCache: Could not create disk store. Initial cause was java.util.Collections$SynchronizedMap cannot be cast to java.util.concurrent.ConcurrentHashMap
    at net.sf.ehcache.store.DiskStore.<init>(DiskStore.java:177)
    at net.sf.ehcache.Cache.createDiskStore(Cache.java:675)

    Thanks,
    Matt
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.