nfsantos commented on PR #1027: URL: https://github.com/apache/jackrabbit-oak/pull/1027#issuecomment-1639942852
@mbaedke The PipelinedStrategy class uses a few pre-allocated internal buffers. The total size of these buffers is bounded by a configuration parameter, the "working memory". If this parameter is not set, it is set automatically based on the current heap size. This is what is happening in the tests, as by default, this parameter is not set. The logic for autodetecting the working memory is here: https://github.com/apache/jackrabbit-oak/blob/59f25b5ee73f711334c176ea16b60be81563a3fe/oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedStrategy.java#L218-L227 In this particular case the heap size is very small, only 512MB, so the value derived from the heap size (Xmm - 2G) is negative. There is a check for this, that sets the working memory to a default minimum of 512MB, which is too much for a heap of 512MB. Here are the relevant logs from the tests: ``` 10:54:28.401 INFO [main] PipelinedStrategy.java:221 Auto detecting working memory. Maximum heap size: 512 MB, selected working memory: -1536 MB 10:54:28.402 WARN [main] PipelinedStrategy.java:223 Working memory too low. Setting to minimum: 512 MB ``` I was not expecting that the unit tests would be run such a small heap. Increasing the heap to 1GB should be sufficient for this test to pass. I think it should be possible to change the minimum default value to something smaller so that the unit tests can run with 512MB of heap. What is the minimum guaranteed heap size that we can assume for the unit tests? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
