[SERVER-28120] Persist config.collections on shards with the latest chunk version for secondary refresh Created: 27/Feb/17 Updated: 05/Apr/17 Resolved: 09/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.5 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Dianna Hohensee (Inactive) | Assignee: | Dianna Hohensee (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2017-03-06, Sharding 2017-03-27 |
| Participants: |
| Description |
|
The primary does a series of chunk metadata writes and it is unsafe for the secondary to refresh until it receives all of the writes. The primary will update the config.collections with the latest chunk version after finishing the series of writes. Secondaries will only refresh in-memory chunk metadata up to the version specified in the config.collection entry on the shard. ------------- Shards need the collection shard key for filtering, eventually the collection UUID (will temporarily be the namespace until that project is complete), and a chunk version for secondary refresh (
It should be persisted in MetadataLoader::_initCollection, where we query the config server for the necessary config.collection entry. |
| Comments |
| Comment by Githook User [ 09/Mar/17 ] |
|
Author: {u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}Message: |
| Comment by Dianna Hohensee (Inactive) [ 02/Mar/17 ] |
|
This will also need to add logic to drop the config.collections entry on the shard. The config.collections entry should be removed AFTER the corresponding config.chunks.ns collection has been dropped. An op observer will watch the config.collections collection for changes that should invalidate the in-memory cache, and we want the secondary not to see any chunks when it goes to refresh after cache invalidation. |