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

createIndexes rounds expireAfterSeconds option on latest servers

    • Type: Icon: Task Task
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • Execution Team 2021-11-15

      The createIndexes behavior on latest servers was changed. Now, when I send this command:

      {
          "createIndexes": "CreateIndexesOperationTests",
          "indexes": [{
                  "key": {
                      "x": 1
                  },
                  "name": "x_1",
                  "expireAfterSeconds": 1.5
              }
          ]
      }
      

      the actually created index contains rounded expireAfterSeconds value. This is what I see via getIndexes for the above command:

      MongoDB Enterprise replset:PRIMARY> db.CreateIndexesOperationTests.getIndexes()
      [
              {
                      "v" : 2,
                      "key" : {
                              "_id" : 1
                      },
                      "name" : "_id_"
              },
              {
                      "v" : 2,
                      "key" : {
                              "x" : 1
                      },
                      "name" : "x_1",
                      "expireAfterSeconds" : 1
              }
      ]
      

      Was this intentional change? If it was I guess it should have generated a downstream changes notification.

            Assignee:
            gabriel.marks@mongodb.com Gabriel Marks
            Reporter:
            dmitry.lukyanov@mongodb.com Dmitry Lukyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: