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

Add an option to have the validate hook skip some collections.

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.6, v3.4, v3.2
    • Sprint:
      TIG 2018-1-15

      Description

      For certain workloads that require large oplogs, it may be desirable to not validate the oplog.

      This ticket intends to have the validate hook ignore collections that are passed in through TestData: e.g. TestData.validateIgnoredNS=['local.oplog.rs'].

      Collection validation in the hook is done here.

      In more detail. validate does 3 things: check the document is valid BSON, check indexes are valid, check the WT table structure. On the oplog, validate can only do the BSON check. Because there are no indexes to validate on the oplog and WT can't verify the table on a live replica set, because it can't get exclusive access. Effectively we'd only be missing the BSON validation. Which I think is not as crucial on the oplog as on user collections. The oplog is always read, so we'd be converting documents in it into BSON anyway, the process of which should uncover some invalid BSON issues. Compare this with if a user's document's BSON gets corrupted when written to disk. if the document is never read again, we'd never find out about it, unless we run validate().

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: