Uploaded image for project: 'Apache YuniKorn'
  1. Apache YuniKorn
  2. YUNIKORN-2577

Remove named returns from IsPodFitNodeViaPreemption

    XMLWordPrintableJSON

Details

    Description

      IsPodFitNodeViaPreemption has defined named returns but does not use them. They should be removed as the way they are used can cause issues that are hard to debug.

      As part of this change we need to further cleanup:

      • The variable ok also gets shadowed multiple times, not just from the named return declaration.
      • The if construct around GetPodNoLock() is not needed as it returns a nil for the pod if it returns false. Just adding the result for the pod always has the same effect.

      Attachments

        Issue Links

          Activity

            People

              ryankert Hsien-Cheng(Ryan) Huang
              wilfreds Wilfred Spiegelenburg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: