[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 (SERVER-28120). It will look roughly like this

    {
        "_id" : UUID,
        "ns" : “test.foo”,
        "key" : {
                       "a" : 1
        },
        “ lastConsistentCollectionVersion”: ChunkVersion
    }

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: SERVER-28120 persist config.collections entries on shards for the collections that the shards possess
Branch: master
https://github.com/mongodb/mongo/commit/b299533d8357a6fbccc7a14f82064c5beef04da6

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.

Generated at Thu Feb 08 04:17:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.