-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
Repl 2018-02-12
The current repl::OplogEntry class is immutable and requires a full oplog entry with all required fields such as oplog timestamp, hash, and version. For the transactions project we will sometimes need a representation of partial oplog entries (in particular, the subops of applyOp) and will sometimes need to build oplog entries incrementally (so, e.g., the optime can be set later).
We will need to
1) Change the IDE for OplogEntryBase so all fields (except possibly opType) are optional, and the structure is no longer immutable.
2) Move the checks for the required fields into the parse() and toBson() methods on OplogEntry.
3) Create separate methods which allow partial parsing and toBson without checking all the fields.
4) Use "const OplogEntry" in existing uses where immutability is desired.
- is related to
-
SERVER-31356 make OplogEntry immutable
- Closed
-
SERVER-32728 SyncTail::syncApply should accept OplogEntry instead of BSONObj for oplog
- Backlog