Turn on strict enforcement of OID - OID(000...) is no longer a "wildcard" that matches everything. This probably means we need to double-check (again) that the cluster's OIDs are well-formed. This is in preparation for enforcing the invariant that collections of different incarnations are not compatible with each other. The epoch of OID(000...) will also be changed to represent a dropped/unversioned/unsharded collection.
The epoch portion (with type OID) of the shard/collection version in a sharded collection is used to differentiate between different incarnations of collections with the same name. For example, given the events:
1. shard test.user
2. drop test.user
3. shard test.user
The test.user collection in #1 & #3 will have different epochs.
List of bugs that are known to fail existing tests when the strict comparison is enforced (ie., these needs to be fixed first before we can flip the switch):
1. Inside setShardVersion there is a short circuit logic for comparing zero versions, totally ignoring the epoch component here.
2. There is a bug inside ChunkManager where it sets the epoch to zero if it cannot find a chunk for a shard.
List of suspicious use of OID(000...) but does not cause existing tests to fail:
1. Inside setShardVersion, here.
- depends on
SERVER-10766 Always write lastmodEpoch field on config.collections
- is duplicated by
SERVER-10781 Set epoch correctly when shard does not have a chunk
SERVER-11256 improve handling of empty vs nonexistent CollectionMetadata