Skip to content

Adapt internal data structures to 512-bit era#42564

Merged
nickitat merged 3 commits intoClickHouse:masterfrom
nickitat:increase_padding_to_64_bytes
Oct 25, 2022
Merged

Adapt internal data structures to 512-bit era#42564
nickitat merged 3 commits intoClickHouse:masterfrom
nickitat:increase_padding_to_64_bytes

Conversation

@nickitat
Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Padding in internal data structures increased to 64 bytes.

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 21, 2022
@nickitat nickitat force-pushed the increase_padding_to_64_bytes branch from 8aa41ba to 5a3cdf4 Compare October 21, 2022 17:29
@alexey-milovidov alexey-milovidov self-assigned this Oct 22, 2022
@nickitat nickitat force-pushed the increase_padding_to_64_bytes branch from d0aee17 to 5f5668d Compare October 23, 2022 11:55
@nickitat nickitat marked this pull request as ready for review October 24, 2022 20:50
@nickitat nickitat force-pushed the increase_padding_to_64_bytes branch from 5f5668d to 52b42bb Compare October 24, 2022 20:50
@nickitat nickitat merged commit 49f6692 into ClickHouse:master Oct 25, 2022
< X-ClickHouse-Progress: {"read_rows":"131011","read_bytes":"1048081","written_rows":"0","written_bytes":"0","total_rows_to_read":"100000","result_rows":"0","result_bytes":"0"}
< X-ClickHouse-Progress: {"read_rows":"131011","read_bytes":"1048081","written_rows":"0","written_bytes":"0","total_rows_to_read":"100000","result_rows":"1","result_bytes":"80"}
< X-ClickHouse-Summary: {"read_rows":"131011","read_bytes":"1048081","written_rows":"0","written_bytes":"0","total_rows_to_read":"100000","result_rows":"1","result_bytes":"80"}
< X-ClickHouse-Progress: {"read_rows":"131011","read_bytes":"1048081","written_rows":"0","written_bytes":"0","total_rows_to_read":"100000","result_rows":"1","result_bytes":"272"}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this PR changed the return bytes? Why is it dependent on the padding?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it it seems that ColumnNumber uses PaddedPODArray as storage and this grew in size due to the extra padding (used to have 64B of padding and now it has 256B), so I guess it's expected.

Not sure why this is marked as not for changelog when the behaviour changes (as we can see in the tests) and CH uses more memory. I'm not saying that's wrong, but a notice would be nice.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think extra 200B memory consumption per column is a significant change for users

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that's not significant, but it's changing the behaviour of the database. In our case we detected it because of integration tests.

I think my expectations about what should be in the changelog are different to the project's guidelines, because I keep having to look back into PRs that made noticeable (and sometimes really important) changes and they never made it to the changelog.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this was added to the changelog anyway. So sorry for the confusion and the noise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no problem 😉

xinyiZzz added a commit to apache/doris that referenced this pull request Jun 3, 2024
1. Add PODArray ut
2. pick ClickHouse/ClickHouse#21533
3. pick ClickHouse/ClickHouse#21678
4. pick ClickHouse/ClickHouse#9498
5. pick ClickHouse/ClickHouse#7791
6. pick ClickHouse/ClickHouse#24271
7. if c_end_of_storage == null, allocated_bytes return 0.
8. Add some checks for DEBUG.
9. TODO: Adapt internal data structures to 512-bit era
ClickHouse/ClickHouse#42564
dataroaring pushed a commit to apache/doris that referenced this pull request Jun 4, 2024
1. Add PODArray ut
2. pick ClickHouse/ClickHouse#21533
3. pick ClickHouse/ClickHouse#21678
4. pick ClickHouse/ClickHouse#9498
5. pick ClickHouse/ClickHouse#7791
6. pick ClickHouse/ClickHouse#24271
7. if c_end_of_storage == null, allocated_bytes return 0.
8. Add some checks for DEBUG.
9. TODO: Adapt internal data structures to 512-bit era
ClickHouse/ClickHouse#42564
seawinde pushed a commit to seawinde/doris that referenced this pull request Jun 5, 2024
1. Add PODArray ut
2. pick ClickHouse/ClickHouse#21533
3. pick ClickHouse/ClickHouse#21678
4. pick ClickHouse/ClickHouse#9498
5. pick ClickHouse/ClickHouse#7791
6. pick ClickHouse/ClickHouse#24271
7. if c_end_of_storage == null, allocated_bytes return 0.
8. Add some checks for DEBUG.
9. TODO: Adapt internal data structures to 512-bit era
ClickHouse/ClickHouse#42564
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants