Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-15437

[SERVER] Eagerly reap config.transactions entries for retryable sessions

      Original Downstream Change Summary

      This ticket added a component that reaps the persisted metadata associated with sessions spawned within a cluster to run transactions on behalf of user operations. Such internal sessions are buffered in memory until a threshold has been reached and then they are batch deleted. Previously metadata for such sessions would only be reaped once the session of the associated user operation expired.

      The docs change needed is that we added a server parameter, internalSessionsReapThreshold which configures the threshold of internal sessions buffered that triggers a batch delete. The threshold defaults to 1000 and can be set to 0 to disable the reaping behavior.

      Description of Linked Ticket

      Sessions spawned to run transactions for retryable writes encode the write's txnNumber in their session id. When a new retryable write / transaction for that same session arrives with a higher txnNumber, previous sessions can no longer be used, so we are free to reap their config.transactions entries. This should be done more eagerly than waiting for the config.system.sessions entry to expire, since a long running session may run many retryable writes that could each require a transaction and create a config.transactions entry.

            Assignee:
            jason.price@mongodb.com Jason Price
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 18 weeks, 4 days ago