wy96f commented on a change in pull request #2791: ARTEMIS-2450 page-size-bytes 
should not be greater than Integer.MAX_VALUE
URL: https://github.com/apache/activemq-artemis/pull/2791#discussion_r314557230
 
 

 ##########
 File path: 
artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
 ##########
 @@ -257,6 +257,26 @@ public void 
testParsingDefaultServerConfigWithENCMaskedPwd() throws Exception {
       assertEquals("helloworld", bconfig.getPassword());
    }
 
+   @Test
+   public void testParsingOverflowPageSize() throws Exception {
+      FileConfigurationParser parser = new FileConfigurationParser();
 
 Review comment:
   > E.g. other sizes are quite happily long currently also. Why is this special
   
   I see in Page::write()/Page::read() all operations are limited to int range, 
such as PagingStoreImpl::currentPageSize, Page::size, and local variables like 
fileSize, processedBytes in Page::readFromSequentialFile(), etc.
   
   > This test, test the new change, but doesnt test for what we are protecting 
from. E.g whats the underlying issue being fixed
   
   I'm not sure what you mean. We're protecting page-size-bytes from being 
greater than Integer.MAX_VALUE(2147483647). So if we set page-size-bytes to 
2147483648, the broker is expected to fail fast to throw exception , correct?
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to