mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
The oversize algorithm was allocating more pages than necessary to accommodate `minTargetSize`. An example would be that a 16k page size and 15k `minTargetSize` would result in a new size of 32k (2 pages). The difference between the minimum number of necessary pages and the estimated size then keeps growing as sizes increase. I don't think there is much value in preemptively allocating pages by over-sizing aggressively since the behavior of the system is quite different from that of a single array where over-sizing avoids copying once the minimum target size is more than a single page. Relates #60173 which lead me to this when `BytesStreamOutput` would allocate a large number of never used pages during serialization of repository metadata.