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

Lazily enforce that persisted collection validators are well formed

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.4, 4.3.4
    • Affects Version/s: None
    • Component/s: Querying, Write Ops
    • None
    • Fully Compatible
    • v4.2
    • Query 2020-01-27, Query 2020-02-10
    • 38

      SERVER-45588 came out of a case where a user had persisted collection validators that were considered valid in 4.0 but not in 4.2 because some checks around RegexMatchExpressions were made tighter in 4.2. This prevented upgrade.

      To avoid this kind of situation in the future, we should not enforce that collection validators which have been persisted are valid until we attempt to use them (when insertions are done). We should still enforce that validators are well formed when setting/creating them (through collMod or createCollection).

       

      It looks like this would be relatively straightforward given the way CollectionImpl enforces that validators are well formed.

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: