Improve memory management in sessionCatalogDestinationManager

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While copying session history in chunk migration, the sessionCatalogDestinationManager creates a CancelableOperationContext per oplog entry received from the donor. CancelableOperationContext will create a future that is kept alive until the CancellationSource of its given token is destructed. If a large number of session entries are migrated or there are a large number of migrations, this can use significant memory.

      We should consider possibly create a fresh sub CancellationSource just the duration of each processed batch of oplog entries (ie create a new one for each iteration of this loop), so copying a large number of sessions during one migration won't accumulate too much memory at least untilĀ SERVER-103945 is done.

              Assignee:
              Unassigned
              Reporter:
              Kruti Shah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: