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

CHECK failure due to floating point precision on reservation request

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.26.0
    • master

    Description

      result.cpus() == cpus() check is failing due to ( double == double ) comparison problem.

      Root Cause :

      Framework requested 0.1 cpu reservation for the first task. So far so good. Next Reserve operation — lead to double operations resulting in following double values :

      results.cpus() : 23.9999999999999964472863211995 cpus() : 24

      And the check ( result.cpus() == cpus() ) failed.

      The double arithmetic operations caused results.cpus() value to be : 23.9999999999999964472863211995 and hence ( 23.9999999999999964472863211995 == 24 ) failed.

      Attachments

        Issue Links

          Activity

            People

              mchadha Mandeep Chadha
              mchadha Mandeep Chadha
              Bernd Mathiske Bernd Mathiske
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: