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

Master detector code should stat nodes before attempting to create

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: agent
    • Labels:
      None

      Description

      The master detector code currently recursively walks the permanent node path (e.g. /home/mesos/cluster), attempting to create /home, then /home/mesos, then /home/mesos/cluster; trapping NoAuth and NodeExists errors along the way.

      A simple performance improvement would be to perform a stat on the full permanent path and skip the recursive creation if it exists. Alternatively, it seems practical to forego node creation by the slave altogether, and have the slave commit suicide if the permanent node is not present.

      The current behavior results in reams of zookeeper server logging when there is a master failover, as user errors are logged by default (which we'd prefer to retain). I'm not sure what the performance impact this has on ZooKeeper, but it's non-zero and a fix seems trivial.

        Issue Links

          Activity

          Hide
          rgs Raul Gutierrez Segales added a comment -

          Create means a txn, exists doesn't create a txn. So it is considerably cheaper.

          Show
          rgs Raul Gutierrez Segales added a comment - Create means a txn, exists doesn't create a txn. So it is considerably cheaper.
          Show
          vinodkone Vinod Kone added a comment - https://reviews.apache.org/r/11366/

            People

            • Assignee:
              vinodkone Vinod Kone
              Reporter:
              wfarner Bill Farner
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development