|
I looked more into what the new code was trying to achieve and I don't think we can really substantially take advantage of existing bucket catalog code. We will need to compute MinMax of the unmatched measurements which is done while traversing through the measurements to build the BSON sub objects. WriteBatch itself doesn't compute MinMax but gets them from a Bucket Object. Only using WriteBatch as a holder of the measurements seems not really a simplification, plus we'll need to handle a lot of unnecessary information like those in BucketHandle.
When we implemented the current version at the beginning of the project, we had a vision to decouple this function from the current bucket catalog code: given some measurements that we know can fit into a bucket and a known bucket id, create a bucket document we can use for either insert/update. I would suggest closing this ticket as won't do.
cc dan.larkin-york@mongodb.com
|