Qpid
  1. Qpid
  2. QPID-4748

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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

        Alan Conway created issue -
        Hide
        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
        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
        Alan Conway added a comment -

        I'm accepting 1.5 as 1.5s

        Show
        Alan Conway added a comment - I'm accepting 1.5 as 1.5s
        Hide
        Alan Conway added a comment -
        Show
        Alan Conway added a comment - Review: https://reviews.apache.org/r/10595/
        Hide
        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
        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. ------------------------------------------------------------------------
        Alan Conway made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        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
        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.
        Justin Ross made changes -
        Fix Version/s 0.24 [ 12324776 ]
        Hide
        Justin Ross added a comment -
        Show
        Justin Ross added a comment - Released in Qpid 0.24, http://qpid.apache.org/releases/qpid-0.24/index.html
        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development