Michael Dürig created OAK-3158: ---------------------------------- Summary: IAE when specifiying 2G cache for FileStore Key: OAK-3158 URL: https://issues.apache.org/jira/browse/OAK-3158 Project: Jackrabbit Oak Issue Type: Bug Components: segmentmk Reporter: Michael Dürig Priority: Minor Fix For: 1.3.6
{{FileStore.newFileStore(dir).withCacheSize(2048)}} results in {noformat}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) {noformat} There is an integer overflow cause by using ints instead of longs to specify the cache size. [~tmueller], could you have a look? -- This message was sent by Atlassian JIRA (v6.3.4#6332)