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

POC: store sum and count in the control field for bucket collections for insertion

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      This ticket is a POC and will not be merged into master until the performance improvements are shown. We can break this ticket up into multiple tickets if it becomes too complicated, but the steps are:

      1. Adding the new option in createCollection for users to opt in to add sum and avg in the control for bucket collections. This will involve adding a new option to the timeseries field in the createCollection command. The options are defined here.
      2. Store these sum and avg values in the control field in buckets collection. You can see where the buckets collection are defined here
      3. Update sum and avg as new documents are added in the buckets collection.

       

      There are three cases where we want to modify and keep track of the sum in a document write / update: 

      1. Make a new bucket and need to set our sums to its initial values
      2. Insert into an open bucket and need to update control.sum values
      3. Update a document in our collection and therefore need to update control.sum

      This ticket covers case 1. Case 3 is separated into another ticket WRITING-15235 , since updates and deletes are completed by a still ongoing project. As for case 2, this tickets covers when documents are inserted into existing open buckets. For insertions into existing closed buckets that require reopening, this is separated into ticket WRITING-15257 

            Assignee:
            alice.li@mongodb.com Alice Li (Inactive)
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: