Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5280

Inconsistent error checking in DRF sorter.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • allocation
    • None

    Description

      There exist a few different error handling styles in the sorter.

      Hard checks

      e.g., DRFSorter::update

      CHECK(weights.contains(name));
      

      No-op if it results in an error condition.

      e.g., DRFSorter::allocated:

      set<Client, DRFComparator>::iterator it = find(name);
      
      if (it != clients.end()) { // TODO(benh): This should really be a CHECK.
      ...
      }
      

      The problem:

      • Silence no-ops is not ideal. (Implicitness makes it hard to debug things and we have run into one instance of this).
      • Hard CHECKs on invalid arguments is often too harsh.
      • Not checking preconditions can lead to subtle bugs.
      • We should check errors consistently.

      Attachments

        Issue Links

          Activity

            People

              xujyan Yan Xu
              xujyan Yan Xu
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: