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

Fix calculation of page retained size for pages involving VariableWidthBlockEncoding blocks #11315

Closed
linzebing opened this issue Mar 3, 2022 · 3 comments
Assignees

Comments

@linzebing
Copy link
Member

linzebing commented Mar 3, 2022

In VariableWidthBlockEncoding, when reading a block, we don't allocate a new Slice but instead return a view https://github.com/trinodb/trino/blob/master/core/trino-spi/src/main/java/io/trino/spi/block/VariableWidthBlockEncoding.java#L70-L71

This is inconsistent with other encodings and makes such blocks return augmented retained sizes. Ideally, we should create a new Slice, but get rid of the extra copy here https://github.com/trinodb/trino/blob/master/core/trino-main/src/main/java/io/trino/execution/buffer/PagesSerde.java#L224-L228. Also in ExchangeSourceReader we will be able to return a view too.

@findepi
Copy link
Member

findepi commented Mar 4, 2022

cc @sopel39

@sopel39
Copy link
Member

sopel39 commented Mar 4, 2022

That's my old PR (closed) where I wanted to fix the issue: prestodb/presto#10634. IIRC I've never benchmarked it

@linzebing
Copy link
Member Author

#11235 resolves this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants