Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9150

partition region expiration uses extra memory on secondaries

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • expiration

    Description

      Partition region expiration usually drives all the expiration from the primary (the unusual case is when the pr also has evict destroy in which case expiration is done on primary and secondaries). But the secondaries still have all the expiration tasks (one for each entry which consumes about 112 bytes of memory per entry). When they fire on the secondary they go into a different pendingExpiry map owned by each bucket. They hang around in that map until the primary expiration happens or a secondary becomes primary. The pendingExpiry map also eats up some memory.

      What we could do instead is no expiration scheduling on secondaries. All expiration would be driven from the primary and use the normal distribution to the secondaries. When a secondary becomes primary then it could kick off a background thread scheduling an expiry task for each entry. Currently when it becomes primary it processes the pending expiry map so that could be replaced with scheduling expiry. LocalRegion already has the code that supports rescheduling expiry since it is something users can dynamically change on an existing region. This would not only reduce the memory usage on secondaries but also simplify our expiration implementation.  PR eviction currently complicates our pr expiration implementation but if our pr eviction destroy was always distributed when the region had expiration, then we would not need any special expiration code to deal with evict destroy.

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dschneider Darrel Schneider

            Dates

              Created:
              Updated:

              Slack

                Issue deployment