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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.2.1, 3.3.0
    • 3.2.3, 3.3.1
    • Sharding
    • Fully Compatible
    • ALL
    • Sharding F (01/29/16)
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: