...
Currently, when a collection is dropped, we only clear the CSR's contents, but don't actually drop the CSS entry from the CSS map. With the recent changes to fix the range deleter preservation on Shard Primaries (SERVER-67385), the clearing of the CSR doesn't actually throw out the contents of the MigrationManager (which really is a reference to the routing table). So in theory, we are leaving more memory behind than we were leaving before upon drop of a sharded collection. Under this ticket we should make the dropping of a collection to entirely throw out the CSS entry rather than just clear it.
xgen-internal-githook commented on Thu, 13 Oct 2022 13:03:57 +0000: Author: {'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'} Message: SERVER-69134 Adding a way to clear the metadata manager (cherry picked from commit fa94f5fb6216a1cc1e23f5ad4df05295b380070e) Branch: v6.1 https://github.com/mongodb/mongo/commit/d6b251841c09766b1a2efef583151289f50b0a88 xgen-internal-githook commented on Thu, 13 Oct 2022 12:56:18 +0000: Author: {'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'} Message: SERVER-69134 Adding a way to clear the metadata manager (cherry picked from commit fa94f5fb6216a1cc1e23f5ad4df05295b380070e) Branch: v6.0 https://github.com/mongodb/mongo/commit/f923ca7045e26803e1fa9f355a802ad0d11adbcb xgen-internal-githook commented on Thu, 13 Oct 2022 12:51:00 +0000: Author: {'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'} Message: SERVER-69134 Adding a way to clear the metadata manager (cherry picked from commit fa94f5fb6216a1cc1e23f5ad4df05295b380070e) Branch: v5.0 https://github.com/mongodb/mongo/commit/86e4ce0ac68e9b408aefdd531e46bdfda437b6f2 xgen-internal-githook commented on Tue, 13 Sep 2022 12:10:50 +0000: Author: {'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'} Message: SERVER-69134 Adding a way to clear the metadata manager Branch: master https://github.com/mongodb/mongo/commit/fa94f5fb6216a1cc1e23f5ad4df05295b380070e