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

Parsing old config.collection documents fails because of missing 'lastmodEpoch' field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.1, 3.3.0
    • Fix Version/s: 3.2.3, 3.3.1
    • Component/s: Sharding
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Sharding F (01/29/16)
    • Linked BF Score:
      0

      Description

      The 'lastmodEpoch' field in the collection document specifies the collection's creation epoch. It is used to differentiate requests for the same collection name in the cases where the collection was dropped and immediately recreated.

      This field was introduced in version 2.2, so collection metadata from earlier versions will not have it. Upgrades do not add this field, so 3.2 mongos reading such legacy metadata will start failing with the following error:

      error while parsing config.collections document: { _id: "dbname.collname", lastmod: new Date(1369013796), dropped: true } : NoSuchKey Missing expected field "lastmodEpoch"
      

      We should make 'lastmodEpoch' an optional field during collection metadata parsing.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: