-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
🟦 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
The 2nd create below should succeed (now that SERVER-60064 is done) since it’s the exact same collection being created:
rs [direct: primary] test> db.runCommand({"create":"system.buckets.freestanding","validator":{"$jsonSchema":{"bsonType":"object","required":["_id","control","data"],"properties":{"_id":{"bsonType":"objectId"},"control":{"bsonType":"object","required":["version","min","max"],"properties":{"version":{"bsonType":"number"},"min":{"bsonType":"object","required":["ts"],"properties":{"ts":{"bsonType":"date"}}},"max":{"bsonType":"object","required":["ts"],"properties":{"ts":{"bsonType":"date"}}},"closed":{"bsonType":"bool"},"count":{"bsonType":"number","minimum":{"$numberInt":"1"}}},"additionalProperties":false},"data":{"bsonType":"object"},"meta":{}},"additionalProperties":false}},"clusteredIndex":true,"timeseries":{"timeField":"ts","metaField":"meta","granularity":"seconds","bucketMaxSpanSeconds":3600}})
{
ok: 1,
'$clusterTime': {
clusterTime: Timestamp({ t: 1772933887, i: 2 }),
signature: {
hash: Binary.createFromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAA=', 0),
keyId: Long('0')
}
},
operationTime: Timestamp({ t: 1772933887, i: 2 })
}
rs [direct: primary] test> db.runCommand({"create":"system.buckets.freestanding","validator":{"$jsonSchema":{"bsonType":"object","required":["_id","control","data"],"properties":{"_id":{"bsonType":"objectId"},"control":{"bsonType":"object","required":["version","min","max"],"properties":{"version":{"bsonType":"number"},"min":{"bsonType":"object","required":["ts"],"properties":{"ts":{"bsonType":"date"}}},"max":{"bsonType":"object","required":["ts"],"properties":{"ts":{"bsonType":"date"}}},"closed":{"bsonType":"bool"},"count":{"bsonType":"number","minimum":{"$numberInt":"1"}}},"additionalProperties":false},"data":{"bsonType":"object"},"meta":{}},"additionalProperties":false}},"clusteredIndex":true,"timeseries":{"timeField":"ts","metaField":"meta","granularity":"seconds","bucketMaxSpanSeconds":3600}})
MongoServerError[NamespaceExists]: Collection test.system.buckets.freestanding already exists.
This showed while fine-tuning time-series support in custom-mongomirror. I’ve found, though, that the problem goes away if I delete the `validator` and `clusteredIndex` fields, so we aren’t blocked.
- is related to
-
SERVER-60064 Make create command idempotent on mongod
-
- Closed
-