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

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

    • Fully Compatible
    • ALL
    • Sharding F (01/29/16)
    • 0

      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.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: