Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6462 Phase II : Erasure Coding Offline Recovery & Read/Write Improvements
  3. HDDS-8682

EC: Avoid O(n) array.remove(element) when filtering pipelines in WritableECContainerProvider

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • SCM

    Description

      When iterating over the pipeline list, if a pipeline is not valid for selection, we call Array.remove(element) to remove it from the list before selecting another random element.

      If the pipeline selection policy could return the array index of the selected pipeline rather than the actual pipeline, then we can use the more efficient Array.remove(index). Even this is still O as the array has to shuffle the elements down the internal array, but it is better than Array.remove(element) as it avoids searching for the element.

      Attachments

        Issue Links

          Activity

            People

              sodonnell Stephen O'Donnell
              sodonnell Stephen O'Donnell
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: