Remove useless rollback check that an oplog entry is smaller than 500 MB

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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());
      

            Assignee:
            [DO NOT USE] Backlog - Replication Team
            Reporter:
            Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: