Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumMongoDBbucket and outlier patternsSingle-choice MCQ

What does the following bucket-write update do when the device has buckets that are all already full (each at count 60)?

db.buckets.updateOne( { device: "d1", count: { $lt: 60 } }, { $push: { measurements: { t: ISODate(), v: 42 } }, $inc: { count: 1 } }, { upsert: true } );