Commons JCS
  1. Commons JCS
  2. JCS-4

Skip optimization with zero removes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Indexed Disk Cache
    • Labels:
      None
    • Environment:
      any

      Description

      If there have been no removes from the disk cache, don't run the optimization. It's unnecessary, since there should be no changes in the disk.

        Activity

        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 -

        Cache checks to see if the data free is greater than 0 before optimizing on shutdown.

        else if ( isShutdownOptimizationEnabled && this.getBytesFree() > 0 )

        { optimizeFile(); }
        Show
        Aaron Smuts added a comment - Cache checks to see if the data free is greater than 0 before optimizing on shutdown. else if ( isShutdownOptimizationEnabled && this.getBytesFree() > 0 ) { optimizeFile(); }
        Hide
        Peter Schwarz added a comment -

        This is also true if there have been no puts.

        If the cache is effectively in read-only mode from start of the application until the end, there is still an optimization run at shutdown.

        Show
        Peter Schwarz added a comment - This is also true if there have been no puts. If the cache is effectively in read-only mode from start of the application until the end, there is still an optimization run at shutdown.

          People

          • Assignee:
            Scott Eade
            Reporter:
            Peter Schwarz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development