Derby
  1. Derby
  2. DERBY-3275

Mismatch between comments and actual use of initialSize parameter in CacheFactory and Clock

    Details

    • Urgency:
      Normal
    • Issue & fix info:
      Newcomer

      Description

      The javadoc for org.apache.derby.iapi.services.cache.CacheFactory.newCacheManager() describes the initialSize parameter like this:

      @param initialSize The number of initial holder objects that will be created

      And org.apache.derby.impl.services.cache.Clock's constructor says the following:

      @param initialSize the initial number of cachable object this cache
      holds.
      @param maximumSize the maximum size of the cache. The cache may grow
      from initialSize to maximumSize if the cache policy notices that there
      is not enough free buffers availiable. Once the cache hits maximumSize
      it will not grow. If the cache is full, an exception will be thrown

      However, when Clock is created, it does not populate the cache with "holder objects" or "cacheable [objects]". It only uses the initialSize to specify the initial capacity of the HashMap and the ArrayList that are created.

      Either the code should be changed so that it's in line with the comments, or the comments should be changed to match the code. I don't see any compelling reason for changing the code, so I think I would prefer changing the comments.

      1. javadoc.diff
        2 kB
        Knut Anders Hatlen

        Activity

        Gavin made changes -
        Workflow jira [ 12419285 ] Default workflow, editable Closed status [ 12802080 ]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Assignee Knut Anders Hatlen [ knutanders ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Knut Anders Hatlen made changes -
        Attachment javadoc.diff [ 12562528 ]
        Hide
        Knut Anders Hatlen added a comment -

        The patch javadoc.diff changes the javadoc comments so that they don't imply that the cache is populated with actual objects on creation.

        Committed revision 1426360.

        Show
        Knut Anders Hatlen added a comment - The patch javadoc.diff changes the javadoc comments so that they don't imply that the cache is populated with actual objects on creation. Committed revision 1426360.
        Kathey Marsden made changes -
        Labels derby_triage10_5_2
        Kathey Marsden made changes -
        Urgency Normal
        Hide
        Kathey Marsden added a comment -

        Triaged for 10.5.2. Set Urgency to Normal.

        Show
        Kathey Marsden added a comment - Triaged for 10.5.2. Set Urgency to Normal.
        Dag H. Wanvik made changes -
        Issue & fix info [Newcomer]
        Dag H. Wanvik made changes -
        Component/s Newcomer [ 12310640 ]
        Dag H. Wanvik made changes -
        Derby Categories [Newcomer]
        Kathey Marsden made changes -
        Assignee Deepthi Devaki A R [ deepthidevaki ]
        Hide
        Kathey Marsden added a comment -

        Unassigning, due to inactivity. Deepthi, please reassign yourself if you would like to work on this issue.

        Show
        Kathey Marsden added a comment - Unassigning, due to inactivity. Deepthi, please reassign yourself if you would like to work on this issue.
        Deepthi Devaki A R made changes -
        Assignee Deepthi Devaki A R [ deepthidevaki ]
        Kathey Marsden made changes -
        Field Original Value New Value
        Component/s Newcomer [ 12310640 ]
        Knut Anders Hatlen created issue -

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development