1. Qpid
  2. QPID-4765

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


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


      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.


        Kim van der Riet created issue -
        Kim van der Riet added a comment -

        Fixed r.1470667

        Thanks to Siddhesh Poyarekar for the patch.

        Kim van der Riet added a comment - Fixed r.1470667 Thanks to Siddhesh Poyarekar for the patch.
        Kim van der Riet made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Justin Ross made changes -
        Fix Version/s 0.23 [ 12324273 ]
        Justin Ross added a comment -
        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 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3h 36m 1 Kim van der Riet 22/Apr/13 22:45
        Resolved Resolved Closed Closed
        138d 14h 51m 1 Justin Ross 08/Sep/13 13:37


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


            • Created: