Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
FileStore.newFileStore(dir).withCacheSize(2048) results in
Max memory must not be negative java.lang.IllegalArgumentException: Max memory must not be negative at org.apache.jackrabbit.oak.cache.CacheLIRS.setMaxMemory(CacheLIRS.java:464) at org.apache.jackrabbit.oak.cache.CacheLIRS.<init>(CacheLIRS.java:163) at org.apache.jackrabbit.oak.cache.CacheLIRS$Builder.build(CacheLIRS.java:1537) at org.apache.jackrabbit.oak.cache.CacheLIRS$Builder.build(CacheLIRS.java:1533) at org.apache.jackrabbit.oak.plugins.segment.StringCache.<init>(StringCache.java:52) at org.apache.jackrabbit.oak.plugins.segment.SegmentTracker.<init>(SegmentTracker.java:126) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.<init>(FileStore.java:343) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore.<init>(FileStore.java:84) at org.apache.jackrabbit.oak.plugins.segment.file.FileStore$Builder.create(FileStore.java:294)
There is an integer overflow cause by using ints instead of longs to specify the cache size.
tmueller, could you have a look?