-
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
ESQL: Track memory from values loaded from lucene #101383
Changes from 1 commit
c4903c7
baf9000
36ca577
a3efe17
a021210
6ff4310
4ed1c7d
7c18d4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,8 +140,9 @@ protected final void ensureCapacity() { | |
return; | ||
} | ||
int newSize = calculateNewArraySize(valuesLength); | ||
adjustBreaker((long) (newSize - valuesLength) * elementSize()); | ||
adjustBreaker(newSize * elementSize()); | ||
growValuesArray(newSize); | ||
adjustBreaker(-valuesLength * elementSize()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made this change while trying to reenable one of the HeapAttack tests - specifically the too many mv fields one. It didn't get it passing, which is genuinely odd to me. Either way, I think it is more correct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ this is more correct as we create a new array of |
||
} | ||
|
||
@Override | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -161,6 +161,7 @@ public static Block[] fromList(BlockFactory blockFactory, List<List<Object>> lis | |
public static Block deepCopyOf(Block block, BlockFactory blockFactory) { | ||
try (Block.Builder builder = block.elementType().newBlockBuilder(block.getPositionCount(), blockFactory)) { | ||
builder.copyFrom(block, 0, block.getPositionCount()); | ||
builder.mvOrdering(block.mvOrdering()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was required to get some tests working. It meant I had to make the method a noop on unsupported block types but that seems ok. |
||
return builder.build(); | ||
} | ||
} | ||
|
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'll take a look at this one now.