[SERVER-85071] Document script to replace time-series mixed-type buckets with single-type Created: 12/Nov/21  Updated: 12/Jan/24  Resolved: 16/Dec/21

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

Type: Task Priority: Major - P3
Reporter: James Wahlin Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: QO 2021-12-13, QO 2021-12-27
Participants:

 Description   

As part of this ticket we could consider writing either a mongosh script or Python script which POCs this process. The high level approach proposed is as follows:

1) Create a new temporary time-series collection
2) FindOne a bucket in the original time-series collection with a mixed type min/max and obtain the bucket _id value
3) Fetch and unpack all documents in that bucket
4) Insert each document into a temp time-series collection in time ascending order
5) Open a transaction
    a) For each bucket in the temp collection, copy to the original collection
    b) Remove the original bucket document by _id
    c) Remove all buckets in the temp collection
6) Commit transaction
7) Goto Step 2



 Comments   
Comment by James Wahlin [ 16/Dec/21 ]

Closing this ticket with the high-level description in place. We can reopen or have professional services write this script from the description when the need arises.

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