[SERVER-29696] Remove useless rollback check that an oplog entry is smaller than 500 MB Created: 16/Jun/17  Updated: 06/Dec/22  Resolved: 17/Apr/20

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

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Operating System: ALL
Participants:

 Description   

Rollback has a check that oplog entries are under 500MB. It misleadingly claims this is the oplog size when it's really just the size of a single oplog entry. Oplog entries can't be larger than 16MB so this will always be true.

https://github.com/mongodb/mongo/blob/1dfd505d9fd3547a963fe748c34690c0d5c9add4/src/mongo/db/repl/rs_rollback.cpp#L176-L178

Status rollback_internal::updateFixUpInfoFromLocalOplogEntry(FixUpInfo& fixUpInfo,
                                                             const BSONObj& ourObj) {
    const char* op = ourObj.getStringField("op");
    if (*op == 'n')
        return Status::OK();
 
    if (ourObj.objsize() > 512 * 1024 * 1024)
        throw RSFatalException(str::stream() << "Rollback too large, oplog size: "
                                             << ourObj.objsize());



 Comments   
Comment by Judah Schvimer [ 17/Apr/20 ]

We are not currently planning to make changes to Rollback via Refetch. Closing Won't Fix.

Comment by Eric Milkie [ 16/Jun/17 ]

I traced this bug back to version 1.6 when replication was originally written! It's been there since day 0.

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