collMod setting expireAfterSeconds on a wildcard index stops the server

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.2.4, 7.0.31, 8.2.6, 8.2.12
    • Component/s: None
    • None
    • Catalog and Routing
    • ALL
    • Hide
      docker run -d --name repro mongo:8.2.12
      
      # wait for startup, then:
      docker exec repro mongosh --quiet test --eval '
        db.c.createIndex({"$**": 1}, {name: "w"});
        db.runCommand({collMod: "c", index: {name: "w", expireAfterSeconds: 100}});
      '
      
      docker inspect repro --format '{{.State.Status}} exit={{.State.ExitCode}}'
      

      The last line reports exited exit=133. The collection can be empty.

      Show
      docker run -d --name repro mongo:8.2.12 # wait for startup, then: docker exec repro mongosh --quiet test --eval ' db.c.createIndex({"$**": 1}, {name: "w"}); db.runCommand({collMod: "c", index: {name: "w", expireAfterSeconds: 100}}); ' docker inspect repro --format '{{.State.Status}} exit={{.State.ExitCode}}' The last line reports exited exit=133 . The collection can be empty.
    • 🟥 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      Setting expireAfterSeconds on a wildcard index stops the server. No error comes back to the client.

      The combination is already known to be invalid, this appears in the log just before the
      server stops.

      Index type 'wildcard' does not support the 'expireAfterSeconds' option
      

      After restarting, the index is still a plain wildcard index with no expireAfterSeconds on it, and there is no repeat shutdown on startup.

      Expected

      Error 72 InvalidOptions, with the index left alone.

      Actual

      The server stops and the process exits with 133.

            Assignee:
            Unassigned
            Reporter:
            Daniel Frankcom (EXT)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: