Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-3158

IAE when specifiying 2G cache for FileStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.3.6, 1.4
    • segmentmk

    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?

      Attachments

        Activity

          People

            thomasm Thomas Mueller
            mduerig Michael Dürig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: