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

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


    • Type: Bug
    • Status: Closed
    • Priority: 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.




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


              • Created: