Solr
  1. Solr
  2. SOLR-1006

ConcurrentLRUCache API improvements

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Component/s: None
    • Labels:
      None

      Description

      This is to make ConcurrentLRUCache more consistent with LinkedHashMap behavior

      1. remove must not call evictionListener.evictedEntry()
      2. EvictionListener must be able prevent eviction of an element by returning a false.
      3. Add a new method Map getOldestItems(long n)
      1. SOLR-1006.patch
        4 kB
        Shalin Shekhar Mangar
      2. SOLR-1006.patch
        3 kB
        Noble Paul

        Activity

        Noble Paul created issue -
        Noble Paul made changes -
        Field Original Value New Value
        Description This is to make ConcurrentLRUCache more consistent with LinkedHashMap behavior

        * remove must not call evictionListener.evictedEntry()
        * EvictionListener must be able prevent eviction of an element by returning a false.
        This is to make ConcurrentLRUCache more consistent with LinkedHashMap behavior

        # remove must not call evictionListener.evictedEntry()
        # EvictionListener must be able prevent eviction of an element by returning a false.
        # Add a new method Map getOldestItems(long n)
        Hide
        Noble Paul added a comment -

        item #1 and #3 are covered

        Show
        Noble Paul added a comment - item #1 and #3 are covered
        Noble Paul made changes -
        Attachment SOLR-1006.patch [ 12399625 ]
        Shalin Shekhar Mangar made changes -
        Assignee Shalin Shekhar Mangar [ shalinmangar ]
        Hide
        Noble Paul added a comment - - edited

        item #2 is more complex and we can fix those later

        Show
        Noble Paul added a comment - - edited item #2 is more complex and we can fix those later
        Hide
        Shalin Shekhar Mangar added a comment -

        Renamed the method to getOldestAccessedItems and added javadocs.

        I'll commit this shortly.

        Show
        Shalin Shekhar Mangar added a comment - Renamed the method to getOldestAccessedItems and added javadocs. I'll commit this shortly.
        Shalin Shekhar Mangar made changes -
        Attachment SOLR-1006.patch [ 12400007 ]
        shalin committed 743294 (2 files)
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 743294.

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 743294.
        Hide
        Shalin Shekhar Mangar added a comment -

        Marked for 1.5

        Show
        Shalin Shekhar Mangar added a comment - Marked for 1.5
        Shalin Shekhar Mangar made changes -
        Fix Version/s 1.4 [ 12313351 ]
        Fix Version/s 1.5 [ 12313566 ]
        Hide
        Shalin Shekhar Mangar added a comment - - edited

        I don't have a use-case for this anymore. Let us close this issue.

        Show
        Shalin Shekhar Mangar added a comment - - edited I don't have a use-case for this anymore. Let us close this issue.
        Shalin Shekhar Mangar made changes -
        Description This is to make ConcurrentLRUCache more consistent with LinkedHashMap behavior

        # remove must not call evictionListener.evictedEntry()
        # EvictionListener must be able prevent eviction of an element by returning a false.
        # Add a new method Map getOldestItems(long n)
        This is to make ConcurrentLRUCache more consistent with LinkedHashMap behavior

        # remove must not call evictionListener.evictedEntry()
        # -EvictionListener must be able prevent eviction of an element by returning a false.-
        # Add a new method Map getOldestItems(long n)
        Shalin Shekhar Mangar made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.4 [ 12313351 ]
        Fix Version/s 1.5 [ 12313566 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development