Create OplogBuffer proxy classes that can only read-to or write-from the buffer

XMLWordPrintableJSON

    • 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.

            Assignee:
            Unassigned
            Reporter:
            Joseph Obaraye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: