Commons JCS
  1. Commons JCS
  2. JCS-9

Shutdown should flush memory to disk only

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: jcs-1.2.7.9
    • Component/s: Composite Cache
    • Labels:
      None
    • Environment:
      All

      Description

      The current shutdown routine sends all items in memory to all auxiliaries. This is completely unnecessary. Instead it should send items to disk only, since the disk auxiliaries are the only auxiliaries that might not have the items in memory.

        Activity

        Hide
        Aaron Smuts added a comment -

        On shutdown the cache will only send memory items to disk auxiliries and not other types on shutdown. It no longer does this via an iterator, it does it via the freeMemoryElements method on the memory cache itself. This has the advantage of pushing the items to disk via the overflow chanel. The overflow chanel has the disk update pattern logic. If the cache is running in disk mode SWAP, then the items in memory will go to disk, otherwise they will not. This makes disk shutdown faster.

        I added unit tests for the composite cache manager shutdown that verify the behavior.

        Show
        Aaron Smuts added a comment - On shutdown the cache will only send memory items to disk auxiliries and not other types on shutdown. It no longer does this via an iterator, it does it via the freeMemoryElements method on the memory cache itself. This has the advantage of pushing the items to disk via the overflow chanel. The overflow chanel has the disk update pattern logic. If the cache is running in disk mode SWAP, then the items in memory will go to disk, otherwise they will not. This makes disk shutdown faster. I added unit tests for the composite cache manager shutdown that verify the behavior.
        Hide
        Aaron Smuts added a comment -

        The fix is in 1.2.7.9

        Show
        Aaron Smuts added a comment - The fix is in 1.2.7.9
        Hide
        Aaron Smuts added a comment -

        opened to edit version

        Show
        Aaron Smuts added a comment - opened to edit version

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development