-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.2.1, 3.3.0
-
Component/s: Sharding
-
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.