Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-104310

Improve memory management in sessionCatalogDestinationManager

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • None
    • 3
    • 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 Unassigned
            Reporter:
            kruti.shah@mongodb.com Kruti Shah
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: