[SERVER-57783] update7.js is not resilient to ObjectID wraparound Created: 17/Jun/21  Updated: 29/Oct/23  Resolved: 16/Jul/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Louis Williams Assignee: Yuhong Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-07-26
Participants:
Linked BF Score: 20

 Description   

The udpate7 test asserts that the documents with 'x' values 1,2,3, inserted in that order, return in the same order when sorted by _id.

function s() {
    return t.find().sort({_id: 1}).map(function(z) {
        return z.x;
    });
}
// snip
t.save({x: 1});
t.save({x: 2});
t.save({x: 3});
 
t.createIndex({x: 1});
 
assert.eq("1,2,3", s(), "F1");

This test fails if the _id increment happens to wrap around in the same second that all 3 documents are inserted.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 16/Jul/21 ]

Author:

{'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}

Message: SERVER-57783 update7.js is not resilient to ObjectID wraparound
Branch: master
https://github.com/mongodb/mongo/commit/134914d052b0b925a27522c299e97293d6605a13

Generated at Thu Feb 08 05:42:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.