Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85071

Document script to replace time-series mixed-type buckets with single-type

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • QO 2021-12-13, QO 2021-12-27

      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
      

            Assignee:
            james.wahlin@mongodb.com James Wahlin
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: