-
Notifications
You must be signed in to change notification settings - Fork 25k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Over account ram usage of array-based vectors (#104159)
This is part of the effort to enable heap attack tests. Currently, when creating Blocks from Vectors, we don't account for the extra bytes used by VectorBlock alongside the Vector. In heap attack tests, the unaccounted memory can be significant, as seen in the manyEval test, where the unaccounted bytes is 40, while the vector is just 128 bytes, resulting in an OOM instead of triggering the circuit breaker. Ideally, Vector#asBlock should adjust the breaker, and callers should release the returned block. While I tried to implement this, there are many places in our tests where we use Vector#asBlock without releasing the block. This is possible because Vector#asBlock doesn't increase the reference to the vector. In the long run, I think we should remove Vector#asBlock and force that callers use newBlockFromVector from the BlockFactory. This would provide clearer semantics and enable proper tracking of blocks in assertions. This PR adds the extra bytes used by VectorBlock to ArrayVector, allowing us to run heap-attack tests.
- Loading branch information
Showing
7 changed files
with
58 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters