Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-449

Exponential Retry Delay, please check arguments

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.7
    • 1.5.0
    • Core
    • None

    Description

      So, i just spent some time debugging, why the couchbase client went crazy:

         long lower = 500
         long upper = 4000
         Delay.exponential(TimeUnit.MILLISECONDS, lower, upper)
      

      But the method actually expects "upper" first and then "lower". It is such a subtle mistake and i did not even consider this method call to be wrong. It has to do with my expectation, that i expect ranges in order from left to right. Such as "from..to" or "start...end" and in this case: "lower..upper", so its my bad.

      But is it possible to make a simple sanity check over the parameters? "lower > upper" could be asserted. It probably saves someone else's time.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          okr2014 okr2014 added a comment -

          correct: "lower <= upper" could be asserted

          okr2014 okr2014 added a comment - correct: "lower <= upper" could be asserted

          You are right, we should put an assertion there - will get it fixed ,thanks for following up on it

          daschl Michael Nitschinger added a comment - You are right, we should put an assertion there - will get it fixed ,thanks for following up on it
          daschl Michael Nitschinger added a comment - http://review.couchbase.org/#/c/82199/

          People

            daschl Michael Nitschinger
            okr2014 okr2014
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty