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

Relax assertion in collmod_convert_to_unique_violations_size_limit.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0, v7.3, v7.0, v6.0
    • CAR Team 2024-05-13
    • 18

      The test checks that a collMod that adds a unique constraint fails because there are duplicated keys, and also that that the command returns the id of the offending documents. It also tests that the command behaves well when the size of the id's is too great (over 8MB), in which case the command will only return documents up to the 8MB limit. However, it assumes that the command will not return the last inserted document. This assumption is incorrect, in particular, if the balancer moves documents between shards, because the id list is returned in RecordId order, and that order can change whenever a migration takes place. The test should check, instead, that the returned set of documents is among the inserted documents, and that less than 8 are returned.

            Assignee:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Reporter:
            aitor.esteve@mongodb.com Aitor Esteve Alvarado
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: