[SERVER-25697] Rename BatchBoundaries::start to be "begin" Created: 19/Aug/16  Updated: 05/May/17  Resolved: 05/May/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.2.0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kevin Pulo Assignee: Kevin Pulo
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-7200 use oplog as op buffer on secondaries Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

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



 Comments   
Comment by Kevin Pulo [ 05/May/17 ]

SERVER-7200 refactored the code such that BatchBoundaries no longer exists. The remaining uses of mongo::repl::StorageInterfaceImpl::kBeginFieldName don't have any confusion between "start" and "begin", so this problem is no longer present.

Generated at Thu Feb 08 04:09:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.