-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Because the OplogBuffer class can be used to both insert and read from the buffer, code like this is ambiguous:
/** src/mongo/db/repl/oplog_applier.h */ // Not owned by us. OplogBuffer* const _oplogBuffer;
Without prior knowledge, it's not clear if the applier plans to read from this buffer or write to it. Creating an OplogBuffer::Front and OplogBuffer::Back class that only supports either reading to or writing from the OplogBuffer, respectively, would make our code more self-documenting.