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

Make collMod no-op behaviour consistent

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • None
    • Query Execution

      As of SERVER-48047, a collMod command which attempts to set an index's hidden field to the same value as it already has in the index catalog results in a no-op. The hidden field will be omitted in the collMod oplog entry, and the command response will not include any information about the hidden field. This was necessary in order to support hidden indexes in multiversion scenarios.

      However, the same is not currently true of the expireAfterSeconds field. If the user attempts to set this to the same value it already has, then the corresponding oplog entry will redundantly include the expireAfterSeconds field, and the command response will explicitly list the (identical) old and new values of the parameter.

      We should decide which behaviour we want, both in terms of the oplog entry and the command response, and make sure that both fields are handled consistently. This may involve pushing the no-op detection down to the replication system here.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: