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

Refactor Sorter so that DocumentSourceGroup can use it instead of SortedFileWriter implementation

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
    • Execution Team 2019-06-17, Execution Team 2019-07-01

      document_source_group.h/cpp skips the Sorter interface and re-implements some of the logic in order to use the SortedFileWriter class directly. This appear to have been done to avoid the sorting phase of Sorter because DocumentSourceGroup has already sorted data.

      Therefore, we should expose an option on the Sorter to handle pre-sorted data, and remove the duplicate code from document_source_group.h/cpp. Additionally, document_source_group.h/cpp forces sorter.h to make internal structs public that would otherwise be private to sorter.cpp because it needs to use them directly. FileDeleter and SorterFileInfo (added by SERVER-17010) should be moved into the cpp file along with the interface change.

            Assignee:
            dan.solnik@mongodb.com Daniel Solnik (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: