[SERVER-60777] Explore the reason for disparity in enabling the change stream pre-post image on collection Created: 18/Oct/21  Updated: 27/Oct/23  Resolved: 10/Feb/22

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

Type: Task Priority: Major - P3
Reporter: Rishab Joshi (Inactive) Assignee: Jennifer Peshansky (Inactive)
Resolution: Works as Designed Votes: 0
Labels: greenerbuild
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: 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
Participants:

 Description   

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.


Generated at Thu Feb 08 05:50:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.