-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The current OplogVisibilityManager implementation proposed uses reverse cursors into the oplog (a capped collection) to implement "wait for all oplog writes to be visible".
It is possible to implement this without reverse cursors by doing the following:
- Tracking lastCommit in the visibility manager, advanced when a slot resolves by commit, but not advanced when resolved by an abort/rollback.
- Ensuring that the visibility manager is notified of slot resolution before the recovery unit commit() function returns. if the visibility tracking is updated after the commit (or is otherwise not atomic with the commit via mutexes, etc.) then a race condition exists that makes this impossible.
It's not immediately clear that avoiding reverse cursors is necessary, but it is another instance of relying on the storage layer for information fully present in the replication layer. We think it may be an opportunity to simplify interfaces and layers - but if it makes things more complicated we should not take this path.