resharding metrics estimate algorithm

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • Sharding 2021-02-22, Service Arch 2021-02-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

       

      https://github.com/mongodb/mongo/blob/4941c446e9091caa1f7151bd874c8d5b72c39bb8/src/mongo/db/s/resharding/resharding_metrics.cpp#L226

      This algorithm estimates remaining operation time.

      I believe it's incorrect in the case of (bytesCopied>0 && oplogEntriesApplied==0), which would be the forward-looking estimate made from within the copy phase.

      It also has significant numerical issues in the granularity of the integer math. Integer division takes place too eagerly via operator/ and via duration casting.

      Let's review, improve, and test it.

       

            Assignee:
            Billy Donahue
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: