Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-2597

inconsistent implementation of 'cumulative distribution function' for Exponential Distribution

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 0.8.1
    • Component/s: None
    • Labels:
      None
    • Severity:
      Low

      Description

      As reported on the mailing list (http://mail-archives.apache.org/mod_mbox/cassandra-dev/201104.mbox/%3CAANLkTimdMSLE8-z0x+0kvzqp7za3AEMLaOFXvd4Z=tvc@mail.gmail.com%3E),

      I just found there are two implementations of 'cumulative distribution
      function' for Exponential Distribution and there are inconsistent :

      FailureDetector

      org.apache.cassandra.gms.ArrivalWindow.p(double)
         double p(double t)
         {
             double mean = mean();
             double exponent = (-1)*(t)/mean;
             return *Math.pow(Math.E, exponent)*;
         }
      

      DynamicEndpointSnitch

      org.apache.cassandra.locator.AdaptiveLatencyTracker.p(double)
         double p(double t)
         {
             double mean = mean();
             double exponent = (-1) * (t) / mean;
             return *1 - Math.pow( Math.E, exponent);*
         }
      

      According to the Exponential Distribution cumulative distribution function
      definition<http://en.wikipedia.org/wiki/Exponential_distribution#Cumulative_distribution_function>,
      the later one is correct

      ... however FailureDetector has been working as advertised for some time now. Does this mean the Snitch version is actually wrong?

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              thepaul paul cannon Assign to me
              Reporter:
              jbellis Jonathan Ellis
              Authors:
              paul cannon
              Reviewers:
              Brandon Williams

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment