Operational Defect Database

BugZero found this defect 17 days ago.

MongoDB | 2660264

Relax assertion in collmod_convert_to_unique_violations_size_limit.js

Last update date:

5/2/2024

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

No fixed releases provided.

Description:

Info

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.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...