Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25697

Rename BatchBoundaries::start to be "begin"

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

      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@mongodb.com Kevin Pulo
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: