-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find break limits for DocBlock tests on fly #104213
Conversation
Pinging @elastic/es-analytics-geo (Team:Analytics) |
|
||
public void testBuildBreaks() { | ||
testBuildBreaks(ByteSizeValue.ofBytes(between(0, MAX_BUILD_BREAKS_LIMIT))); | ||
testBuildBreaks(ByteSizeValue.ofBytes(randomLongBetween(0, MAX_BUILD_BREAKS_LIMIT))); | ||
} | ||
|
||
public void testBuildBreaksMax() { | ||
testBuildBreaks(ByteSizeValue.ofBytes(MAX_BUILD_BREAKS_LIMIT)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the MAX limit test if we're going to find this on the fly. The act of finding it confirms that it breaks.
private static long MAX_SHARD_SEGMENT_DOC_MAP_BREAKS = -1; | ||
|
||
@Before | ||
public void calculateBreakLimit() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this to the tests that need them. If the build process doesn't properly release on failure this could leave behind un-released blocks. Better to have that fail in the test, i think.
@nik9000 I've reworked these tests as you suggested. Can you take another look? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Thank you, Nik! |
The test failure is related to #104159, where we had an overestimate of the RAM usage for X-ArrayVector. Instead of updating the break limits, this PR uses the breaker utility that @nik9000 wrote to dynamically compute the limits on-the-fly.
Closes #104191