-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: WiredTiger
-
None
The authLog structure is as follows :
{ "_id": NumberInt("0"), "la": ISODate("2020-12-04T01:25:54.054Z"), },
Then I use the following script operation:
for(var i = 0;i<2000;i++)
{ db.authLog.updateOne(\{"_id":i}, {$currentDate: {"la":true}});
}
Then I discovered that it is possible that the update timestamp with a larger id is smaller than the update timestamp with a smaller id.E.g :
{ "_id": NumberInt("100"), "la": ISODate("2020-12-04T01:25:54.054Z"), },
{ "_id": NumberInt("201"), "la": ISODate("2020-12-04T01:25:54.052Z"), }.
Why does this happen and how to solve it?