[SERVER-67145] Inconsistent struct parameter serialisation on mongod / mongos Created: 08/Jun/22  Updated: 29/Oct/23  Resolved: 31/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Romans Kasperovics Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-67876 Enable Feature flag 2 for Mechanism f... Closed
Related
related to SERVER-70980 Complete TODO listed in SERVER-67145 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

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)
     }
]

Sprint: Security 2022-11-14
Participants:

 Description   

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



 Comments   
Comment by Gabriel Marks [ 31/Oct/22 ]

This should have been fixed by SERVER-67876. This ticket enables a feature flag which, among other things, causes mongos to use the same method as mongod to get cluster parameters.

Generated at Thu Feb 08 06:07:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.