Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-32

Shutdown hook does not actually save keys to disk

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0-beta-1
    • Component/s: Indexed Disk Cache
    • Labels:
      None

      Description

      IndexedDiskCache add a Runtime's shutdown hook to dispose itself. However, this behaves differently from calling CompositeCacheManager.shutdown(). The former fails to save the keys into the disk while the latter can do so. Below is the run log from IndexedDiskCache.Shutdown running during JVM shutdown: (index and data file is empty)

      [2007-11-13 11:44:36,221] [WARN ] [IndexedDiskCache] Region [scxmlcontext] Disk cache not shutdown properly, shutting down now.
      [2007-11-13 11:44:36,221] [INFO ] [CompositeCache] In DISPOSE, [scxmlcontext] fromRemote [false]
      Region Name = scxmlcontext
      HitCountRam = 0
      HitCountAux = 0
      ---------------------------LRU Memory Cache
      List Size = 2
      Map Size = 2
      Put Count = 2
      Hit Count = 0
      Miss Count = 0
      ---------------------------Indexed Disk Cache
      Is Alive = true
      Key Map Size = 0
      Data File Length = 0
      Hit Count = 0
      Bytes Free = 0
      Optimize Operation Count = 0
      Times Optimized = 0
      Recycle Count = 0
      Recycle Bin Size = 0
      Startup Size = 0
      Purgatory Hits = 0
      Purgatory Size = 0
      Working = true
      Alive = false
      Empty = true
      Size = 0
      [2007-11-13 11:44:36,221] [DEBUG] [IndexedDiskCache] Region [scxmlcontext] Saving keys to: scxmlcontext, key count: 0
      [2007-11-13 11:44:36,237] [INFO ] [CompositeCache] In DISPOSE, [scxmlcontext] SKIPPING auxiliary [org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache@197bb7] fromRemote [false]
      [2007-11-13 11:44:36,237] [DEBUG] [IndexedDisk] Resetting Indexed File [D:\gila\scxmlcontext.key]

        Attachments

          Activity

            People

            • Assignee:
              asmuts Aaron Smuts
              Reporter:
              berts_15 Andy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: