-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Cluster Scalability
-
ALL
Currently,
- 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)
- 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.