Skip to content
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

HashAggregationOperator misreports memory usage after spilling #10596

Open
findepi opened this issue Jan 13, 2022 · 1 comment
Open

HashAggregationOperator misreports memory usage after spilling #10596

findepi opened this issue Jan 13, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Jan 13, 2022

In some situations, when spilling occurs, HashAggregationOperator doesn't reset memory usage to 0 upon finishing.

Can be reproduced with io.trino.operator.TestHashAggregationOperator#testHashAggregationMemoryReservation

after adding assertions:

// this passes
assertEquals(getOnlyElement(operator.getOperatorContext().getNestedOperatorStats()).getRevocableMemoryReservation().toBytes(), 0);
// this fails in some cases:
assertEquals(getOnlyElement(operator.getOperatorContext().getNestedOperatorStats()).getSystemMemoryReservation().toBytes(), 0);

right after

assertEquals(getOnlyElement(operator.getOperatorContext().getNestedOperatorStats()).getUserMemoryReservation().toBytes(), 0);

cc @sopel39

@sopel39
Copy link
Member

sopel39 commented Jan 14, 2022

It will zero memory on close, bu I agree it should release on finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants