Kim van der Riet created QPID-4765:
--------------------------------------

             Summary: Incorrect parameter validation for legacystore 
wcache-page-size and jfile-size-pgs
                 Key: QPID-4765
                 URL: https://issues.apache.org/jira/browse/QPID-4765
             Project: Qpid
          Issue Type: Bug
          Components: C++ Broker
            Reporter: Kim van der Riet
            Assignee: Kim van der Riet
            Priority: Minor


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to