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

4.2.13 removed rs.initiate() return object time values

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.13
    • Component/s: None
    • None
    • ALL
    • Sharding 2021-04-05, Sharding 2021-04-19, Sharding 2021-05-03

      Problem Description

      The return value of rs.initiate() includes $clusterTime and operationTime properties in all other server versions (4.0.x, 4.4.x, latest-alpha and 4.2.x up to 4.2.12). 4.2.13 breaks this, and subsequently also our integration tests.

      Steps to Reproduce

      Spin up mongod servers with a shared replset id and no other configuration. Connect to them with the mongo shell and run rs.initiate() with minimal configuration.

      Expected Results

      As on 4.2.12:

      MongoDB Enterprise > rs.initiate({ _id: 'rs0', members: [ { _id: 0, host: 'localhost:42121', priority: 1 }, { _id: 1, host: 'localhost:42122', priority: 1 } ] })
      {
      	"ok" : 1,
      	"$clusterTime" : {
      		"clusterTime" : Timestamp(1616176864, 1),
      		"signature" : {
      			"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
      			"keyId" : NumberLong(0)
      		}
      	},
      	"operationTime" : Timestamp(1616176864, 1)
      }
      MongoDB Enterprise rs0:SECONDARY>
      

      Actual Results

      On 4.2.13:

      MongoDB Enterprise > rs.initiate({ _id: 'rs0', members: [ { _id: 0, host: 'localhost:42131', priority: 1 }, { _id: 1, host: 'localhost:42132', priority: 1 } ] })
      { "ok" : 1 }
      MongoDB Enterprise rs0:SECONDARY>
      

      Additional Notes

      Not a critical change for us, but surprising. Happens with both community and enterprise servers.

            Assignee:
            jack.mulrow@mongodb.com Jack Mulrow
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: