Rename BatchBoundaries::start to be "begin"

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.2.0
    • Component/s: Replication
    • None
    • Fully Compatible
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The member inside BatchBoundaries is called "start", but the corresponding field inside the minvalid doc is called "begin". This mismatch hinders the readability of the code, especially for people who are unfamiliar with it.

      It also means that some error messages refer to the "start" timestamp, even though this timestamp is called "begin" in minvalid, eg. this one:

      if (!mv.start.isNull()) {
          // If we are in the middle of a batch, and recoveringm then we need to truncate the oplog.
          LOG(2) << "Recovering from a failed apply batch, start:" << mv.start.toBSON();
          truncateOplogTo(txn, mv.start.getTimestamp());
      }
      

      Since changing the minvalid field name would be needlessly difficult, it would be good to change the relevant occurrences of "start" in the code to "begin".

              Assignee:
              Kevin Pulo
              Reporter:
              Kevin Pulo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: