[SERVER-33454] Remove the 'chunks map' from CollectionMetadata Created: 22/Feb/18  Updated: 29/Oct/23  Resolved: 09/Mar/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Martin Neupauer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2018-03-12
Participants:

 Description   

Currently the CollectionMetadata used for filtering contains copy of a subset of the ChunkManager's map of chunk ranges. This is only used for the range deleter and for figuring out when the last chunk is being moved out of a shard.

In order to make the CollectionMetadata a thin wrapper around the ChunkManager, we should remove these usages of CollectionMetadata::_chunksMap and replace them with calls to the ChunkManager itself.

As part of this ticket we should also consider giving CollectionMetadata a by-value semantics.



 Comments   
Comment by Githook User [ 07/Mar/18 ]

Author:

{'email': 'martin.neupauer@10gen.com', 'name': 'Martin Neupauer', 'username': 'MartinNeupauer'}

Message: SERVER-33454 Remove the 'chunks map' from CollectionMetadata

Removed _chunksMap from the CollectionMetadata class so the class is a
simple passthrough wrapper over the ChunkManager.
As a result getChunks() is a bit less efficient now as it recomputes the
range map on every call but it is used rarely.
Branch: master
https://github.com/mongodb/mongo/commit/2df0c12a05c2572c80f8cf9ac8046abcb6e904b5

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