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

Sessions migrated by chunk migration and resharding should inherit the "lastWriteDate" on the donor

    • Cluster Scalability
    • ALL

      Currently, 

      1. Migrating the history of a session involves copying over oplog entries (each wrapped inside a noop oplog entry) and upserting the config.transactions document for that session to point to the noop oplog entry after each noop oplog entry is written, where "lastWriteOpTime" and "lastWriteDate" are set to those of the noop oplog entry (here and here)
      2. The periodic reaper only deletes config.transactions document with "lastWriteDate" older than 30 minutes

      The side effect of (1) is that after a chunk migration or resharding operation, the lifetime of a config.transactions document is reset. That is, after a chunk migration a config.transactions document that should expire in 1 minute would instead expire in 30 minutes. So when there are back to back chunk migrations and resharding operations, there would be more and more sessions to migrate. We think that this can be fixed by doing one of the following:

      • Make step (1) account for the "lastWriteDate" on the donor (e.g. set it to the max of the recipient's local "lastWriteDate" and donor's "lastWriteDate"). 
      • Clear the entry for a migrated session from the SessionCatalog after doing the writes in step (1). The entry would get re-created anyway when a client checks it out to run operations.

            Assignee:
            Unassigned Unassigned
            Reporter:
            cheahuychou.mao@mongodb.com Cheahuychou Mao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: