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

Inconsistent struct parameter serialisation on mongod / mongos

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Hide

      For instance in JS test file - jstests/noPassthrough/change_streams_cluster_parameter.js for a struct-type parameter changeStreams with field expireAfterSeconds (safeInt64, default 3600),

       

      adminDB.runCommand({setClusterParameter: {changeStreams:{}}});
      adminDB.runCommand({getClusterParameter: "changeStreams"});

       
      The last command returns on mongoS

      "clusterParameters" : [
           {
                "_id" : "changeStreams",
                "clusterParameterTime" : Timestamp(1654725012, 66),
           }
      ]
      

      and on mongoD

      "clusterParameters" : [
           {
                "_id" : "changeStreams",
                "clusterParameterTime" : Timestamp(1654725012, 66),
                "enabled" : false,
                "expireAfterSeconds": NumberLong(3600)
           }
      ]
      

      Show
      For instance in JS test file - jstests/noPassthrough/change_streams_cluster_parameter.js for a struct-type parameter changeStreams with field expireAfterSeconds (safeInt64, default 3600),   adminDB.runCommand({setClusterParameter: {changeStreams:{}}}); adminDB.runCommand({getClusterParameter: "changeStreams" });   The last command returns on mongoS "clusterParameters" : [ { "_id" : "changeStreams", "clusterParameterTime" : Timestamp(1654725012, 66),   } ] and on mongoD "clusterParameters" : [ { "_id" : "changeStreams", "clusterParameterTime" : Timestamp(1654725012, 66), "enabled" : false, "expireAfterSeconds": NumberLong(3600)   } ]
    • Security 2022-11-14

    Description

      For a struct-type parameter, the default values are serialized differently on mongoD and on mongoS.

      Attachments

        Activity

          People

            gabriel.marks@mongodb.com Gabriel Marks
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: