Defragmentation action objects are unnecessarily copied while processed by the Balancer

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-02-21
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The logic implemented by the balancer to retrieve, submit and acknowledge defragmentation commands from the policy involves multiple object copies (1, 2) that could be replaced with {{std::move()}}s.

      The case of SplitInfo is particularly problematic, as it might involve the copy of a std::vector<BSONObjs> containing thousands of elements.

            Assignee:
            Paolo Polato
            Reporter:
            Paolo Polato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: