[SERVER-70688] Implement a mechanism to periodically remove useless entries from config.placementHistory Created: 19/Oct/22  Updated: 29/Oct/23  Resolved: 11/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Paolo Polato Assignee: Enrico Golfieri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Sharding EMEA
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2023-04-03, Sharding EMEA 2023-04-17
Participants:

 Description   

The config.placementHistory collection implements a log of any change affecting the placement of every sharded nss in the cluster (each event is recorded as a separate document); it may therefore grow indefinitely if not periodically pruned.

On the other hand,

  • a document storing placement information at time T is only useful if each involved shard hasn't pruned any entry with opTime >= T from its oplog
  • such document can be safely removed if config.placementHistory contains at least one more recent entry referencing the same namespace

Based on such condition, the config server should implement a new mechanism to periodically clean up the content of config.placementHistory



 Comments   
Comment by Githook User [ 06/Apr/23 ]

Author:

{'name': 'Enrico', 'email': 'enrico.golfieri@mongodb.com', 'username': 'enricogolfieri'}

Message: SERVER-70688 add periodic task to clean-up placementHistory
Branch: master
https://github.com/mongodb/mongo/commit/fcacd3becb523fbd942caf114be292c1b8d63473

Generated at Thu Feb 08 06:16:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.