-
Type:
Task
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: Backlog
-
Component/s: None
-
QE 2021-11-29, QE 2021-12-13, QE 2021-12-27, QE 2022-01-10, QE 2022-02-07, QE 2022-02-21, QE 2022-01-24
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Config:
storage: dbPath: /data/shard2 replication: replSetName: shard2 sharding: clusterRole: shardsvr net: bindIp: localhost port: 20002
If we ran the below command in a single-node replica set without being connected to mongoS, we see errors:
shard:PRIMARY> y = db.createCollection("stock", {changeStreamPreAndPostImages: {enabled: true}}) { "ok" : 0, "errmsg" : "BSON field 'changeStreamPreAndPostImages' is an unknown field.", "code" : 5846900, "codeName" : "Location5846900", "$clusterTime" : { "clusterTime" : Timestamp(1634565583, 6), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "operationTime" : Timestamp(1634565583, 6) }
But when we connect this shard to the mongoS, it works fine. I am running this command still in the same replica-set not in mongoS
shard:PRIMARY> y = db.createCollection("stock", {changeStreamPreAndPostImages: {enabled: true}}) { "ok" : 1, "lastCommittedOpTime" : Timestamp(1634565913, 3), "$clusterTime" : { "clusterTime" : Timestamp(1634565919, 1), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "operationTime" : Timestamp(1634565919, 1) }
We should explore this disparity.