Qpid
  1. Qpid
  2. QPID-4765

Incorrect parameter validation for legacystore wcache-page-size and jfile-size-pgs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      The store module incorrectly changes the size of the page cache to 64kB when the file size parameter is equal to 1 (--jfile-size-pgs=1) for any valid page cache size. This should only happen when the page cache size is set to 128kB.

      The legacystore file size is specified in terms of the read cache size (which is fixed to 64kB). Hence a jfile-size-pgs set to 1 creates 64kB files, the smallest allowed. However, the write page cache, set by the wcache-page-size parameter, cannot be larger than the physical file size, as libaio uses DMA to write each page, and this cannot be split between files. This can occur for only one legal setting of wcache-page-size, ie 128kB. In this case only, a check must be made to see if the file size parameter jfile-size-pgs==1. If so, then the write cache size exceeds the physical file size, and must be reduced to be the same as the physical file size, ie 64kB.

      The logic incorrectly makes this change for all legal write page cache size values, not just the maximum of 128kB where this change is required.

        Activity

        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
        Hide
        Kim van der Riet added a comment -

        Fixed r.1470667

        Thanks to Siddhesh Poyarekar for the patch.

        Show
        Kim van der Riet added a comment - Fixed r.1470667 Thanks to Siddhesh Poyarekar for the patch.

          People

          • Assignee:
            Kim van der Riet
            Reporter:
            Kim van der Riet
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development