Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-4748

Consistent handling of durations in broker configuration, allowing sub-second intervals.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.22
    • Fix Version/s: 0.24
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      Allow sub-second intervals in broker configuration settings that take a value in seconds.

      There was an ad-hock change to allow link-maintenance-interval to be specified as a floating point value.
      Implement a more consistent approach allowing intervals to be expressed as any of

      10 - value in seconds, backward compatible.
      10s - value in seconds
      10ms - value in milliseconds
      10us - value in microseconds
      10ns - value in nanoseconds

        Activity

        Hide
        astitcher Andrew Stitcher added a comment -

        What about decimal fractions? are you suggesting accepting 1.5 as 1.5s now when the previous parsing would have rejected this (or perhaps truncated it as 1s).

        I realise you could also specify 1500ms as well.

        Show
        astitcher Andrew Stitcher added a comment - What about decimal fractions? are you suggesting accepting 1.5 as 1.5s now when the previous parsing would have rejected this (or perhaps truncated it as 1s). I realise you could also specify 1500ms as well.
        Hide
        aconway Alan Conway added a comment -

        I'm accepting 1.5 as 1.5s

        Show
        aconway Alan Conway added a comment - I'm accepting 1.5 as 1.5s
        Hide
        aconway Alan Conway added a comment -
        Show
        aconway Alan Conway added a comment - Review: https://reviews.apache.org/r/10595/
        Hide
        aconway Alan Conway added a comment -

        Fixed on trunk:

        ------------------------------------------------------------------------
        r1469661 | aconway | 2013-04-18 22:00:16 -0400 (Thu, 18 Apr 2013) | 16 lines

        QPID-4748: Consistent handling of durations in broker configuration, allowing sub-second intervals.

        Provides string conversion for sys::Duration, allowing intervals to be expressed like this:

        10.5 - value in seconds, backward compatible.
        10.5s - value in seconds
        10.5ms - value in milliseconds
        10.5us - value in microseconds
        10.5ns - value in nanoseconds

        Converted the folllowing brokerall the following boild options to Duration:
        mgmtPubInterval, queueCleanInterval, linkMaintenanceInterval, linkHeartbeatInterval

        Did not convert: maxNegotiateTime. This is expressed in milliseconds so it would not be
        backward compatible to make it a Duration.

        ------------------------------------------------------------------------

        Show
        aconway Alan Conway added a comment - Fixed on trunk: ------------------------------------------------------------------------ r1469661 | aconway | 2013-04-18 22:00:16 -0400 (Thu, 18 Apr 2013) | 16 lines QPID-4748 : Consistent handling of durations in broker configuration, allowing sub-second intervals. Provides string conversion for sys::Duration, allowing intervals to be expressed like this: 10.5 - value in seconds, backward compatible. 10.5s - value in seconds 10.5ms - value in milliseconds 10.5us - value in microseconds 10.5ns - value in nanoseconds Converted the folllowing brokerall the following boild options to Duration: mgmtPubInterval, queueCleanInterval, linkMaintenanceInterval, linkHeartbeatInterval Did not convert: maxNegotiateTime. This is expressed in milliseconds so it would not be backward compatible to make it a Duration. ------------------------------------------------------------------------
        Hide
        astitcher Andrew Stitcher added a comment -

        it would be possible to convert maxNegotiateTime too if there was some concept of default units to be used if none are specified.

        But this is probably not worth the effort.

        Show
        astitcher Andrew Stitcher added a comment - it would be possible to convert maxNegotiateTime too if there was some concept of default units to be used if none are specified. But this is probably not worth the effort.
        Hide
        justi9 Justin Ross added a comment -
        Show
        justi9 Justin Ross added a comment - Released in Qpid 0.24, http://qpid.apache.org/releases/qpid-0.24/index.html

          People

          • Assignee:
            aconway Alan Conway
            Reporter:
            aconway Alan Conway
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development