[SERVER-73901] Time-series inserts succeed even if time-series view does not exist Created: 10/Feb/23  Updated: 09/May/23

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Storage Execution
Operating System: ALL
Steps To Reproduce:

MongoDB Enterprise > db.createCollection("c", {timeseries: {timeField: "t"}})
{ "ok" : 1 }
MongoDB Enterprise > db.system.views.find()
{ "_id" : "test.c", "viewOn" : "system.buckets.c", "pipeline" : [ { "$_internalUnpackBucket" : { "timeField" : "t", "bucketMaxSpanSeconds" : 3600 } } ] }
MongoDB Enterprise > db.adminCommand({applyOps: [{"op": "d", "ns": "test.system.views", "o": {"_id": "test.c"}}]})
{ "applied" : 1, "results" : [ true ], "ok" : 1 }
MongoDB Enterprise > db.system.views.find()
MongoDB Enterprise > db.c.insert({t: ISODate()})
WriteResult({ "nInserted" : 1 })
MongoDB Enterprise > db.system.buckets.find()
MongoDB Enterprise > db.system.buckets.c.find()
{ "_id" : ObjectId("63e574602386bee9e7ef7a75"), "control" : { "version" : 1, "min" : { "_id" : ObjectId("63e574734ba6a20dd8db3782"), "t" : ISODate("2023-02-09T22:32:00Z") }, "max" : { "_id" : ObjectId("63e574734ba6a20dd8db3782"), "t" : ISODate("2023-02-09T22:32:19.951Z") } }, "data" : { "_id" : { "0" : ObjectId("63e574734ba6a20dd8db3782") }, "t" : { "0" : ISODate("2023-02-09T22:32:19.951Z") } } }

Participants:
Linked BF Score: 14

 Description   

If we get into a scenario where a time-series buckets collection exists but the corresponding view does not, inserting into the (would-be) view namespace still succeeds as if it did exist.



 Comments   
Comment by Louis Williams [ 14/Feb/23 ]

Note from triage meeting: this can happen after a rollback

Generated at Thu Feb 08 06:25:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.