[SERVER-10758] Strict Epoch comparison Created: 13/Sep/13  Updated: 11/Jul/16  Resolved: 06/Jun/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 2.5.2
Fix Version/s: 2.7.2

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-10766 Always write lastmodEpoch field on co... Closed
Duplicate
is duplicated by SERVER-10781 Set epoch correctly when shard does n... Closed
is duplicated by SERVER-11256 improve handling of empty vs nonexist... Closed
Operating System: ALL
Participants:

 Description   

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.

Background:
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.



 Comments   
Comment by Githook User [ 04/Dec/13 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-10758 Strict Epoch comparison

Set epoch correctly when shard does not have a chunk.
Branch: master
https://github.com/mongodb/mongo/commit/20e58c1e87d1abd8105fac04d2fbacb215015f37

Generated at Thu Feb 08 03:23:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.