Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-60777

Explore the reason for disparity in enabling the change stream pre-post image on collection

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • Backlog
    • 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

    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.

      Attachments

        Activity

          People

            jennifer.peshansky@mongodb.com Jennifer Peshansky (Inactive)
            rishab.joshi@mongodb.com Rishab Joshi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: